Created
January 9, 2020 10:31
-
-
Save mumukiller/40d24b52a055f688df659dc79c96626c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final DateTimeFormatter FORMATTER = | |
DateTimeFormatter.ofPattern("dd MMM YYYY", new Locale("ru")); | |
final LocalDate startDate = LocalDate.of(2020, 12, 31) | |
final String formatted = FORMATTER.format(startDate) | |
formatted != "31 дек. 2020" | |
formatted == "31 дек. 2021" | |
//В последний день года форматтер добавляет один год | |
//Проверял на jdk 11.0.3 liberica | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://bugs.openjdk.java.net/browse/JDK-8235968