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

Localization format #398

Closed
sonatard opened this issue May 22, 2024 · 1 comment
Closed

Localization format #398

sonatard opened this issue May 22, 2024 · 1 comment

Comments

@sonatard
Copy link

sonatard commented May 22, 2024

In Java, we can use DateTimeFormatter to select the appropriate format for each localization. Is there a way to achieve this with kotlinx-datetime?

https://docs.oracle.com/javase/jp/8/docs/api/java/time/format/DateTimeFormatter.html
https://developer.android.com/reference/java/time/format/FormatStyle

DateTimeFormatter.ofLocalizedDateTime(FormatStyle.SHORT)
// US
// 5/22/24 12:24 PM
// JP
// 2024/5/22 12:24

DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT)
// US
// 5/22/24
// JP
// 2024/5/22
@dkhalanskyjb
Copy link
Collaborator

Duplicate of #352

@dkhalanskyjb dkhalanskyjb marked this as a duplicate of #352 May 22, 2024
@dkhalanskyjb dkhalanskyjb closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 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