Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locale for JS not working? #456

Closed
alekseyHunter opened this issue Nov 12, 2024 · 1 comment
Closed

Locale for JS not working? #456

alekseyHunter opened this issue Nov 12, 2024 · 1 comment

Comments

@alekseyHunter
Copy link

Hello!

I'm trying to format LocalDateTime with next pattern "dd MMMM":

actual fun LocalDateTime.format(format: String): String {
    return DateTimeFormatter.ofPattern(format)
        .withLocale("ru" as Locale)
        .format(
            nativeJs(
                Date(
                    milliseconds = this.toInstant(
                        TimeZone.currentSystemDefault()
                    ).toEpochMilliseconds()
                )
            )
        )
}

I got the next error:
image

@dkhalanskyjb
Copy link
Collaborator

Hi! DateTimeFormatter, withLocale, Locale, nativeJs, and Date are not parts of this library at all, so we can't help you with that.

Our own implementation of formatting also currently doesn't support locales: #352

@dkhalanskyjb dkhalanskyjb closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants