Skip to content

Instantly share code, notes, and snippets.

@mumukiller
Created January 9, 2020 10:31
Show Gist options
  • Save mumukiller/40d24b52a055f688df659dc79c96626c to your computer and use it in GitHub Desktop.
Save mumukiller/40d24b52a055f688df659dc79c96626c to your computer and use it in GitHub Desktop.
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
@mumukiller
Copy link
Author

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