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

DateTimeFormatter doesn't follow locale when using QQQQ pattern #167

Open
xatok opened this issue Sep 15, 2022 · 1 comment
Open

DateTimeFormatter doesn't follow locale when using QQQQ pattern #167

xatok opened this issue Sep 15, 2022 · 1 comment
Labels

Comments

@xatok
Copy link

xatok commented Sep 15, 2022

This code using 1.6.1 version of threetenbp:

 org.threeten.bp.LocalDate
        .of(2020, 1, 1)
        .format(org.threeten.bp.format.DateTimeFormatter.ofPattern("QQQQ", Locale.FRANCE))

outputs: 1st quarter

And then the same code using Java 11 implementation it outputs the correct format:

    java.time.LocalDate
        .of(2020, 1, 1)
        .format(java.time.format.DateTimeFormatter.ofPattern("QQQQ", Locale.FRANCE))

outputs: 1er trimestre

The outputs should be also localized with threetenbp.

@jodastephen
Copy link
Member

Threeten-Backport doe not have a general purpose mechanism for supplying text like this, it would be a big job to do so. Later JDKs simply have more data built in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants