Skip to content

UndefinedBehaviorError: java.lang.ArrayIndexOutOfBoundsException: 0 #462

@faveoled

Description

@faveoled
import java.time.LocalDateTime
import java.time.format.DateTimeFormatterBuilder
import java.time.temporal.ChronoField
import java.time.format.TextStyle
import java.util.Locale
import java.time.format.DateTimeFormatter
import java.time.LocalDate
import java.time.ZoneId

val formatterFull: DateTimeFormatter = new DateTimeFormatterBuilder()
    .appendPattern("dd ")
    .appendText(ChronoField.MONTH_OF_YEAR, TextStyle.FULL_STANDALONE)
    .toFormatter(Locale.forLanguageTag("uk"))
val today = LocalDate.now(ZoneId.of("UTC"))
val todayString = today.format(formatterFull)
print(todayString)

This code works on JVM but fails with UndefinedBehaviorError on Scala.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions