Tagged articles
1 articles
Page 1 of 1
Programmer DD
Programmer DD
Jan 1, 2020 · Fundamentals

Why Using ‘YYYY’ Instead of ‘yyyy’ Can Break Your Java Dates

A subtle mistake of using the week‑based year pattern ‘YYYY’ instead of the calendar year ‘yyyy’ in Java DateTimeFormatter can cause unexpected date bugs, especially around year boundaries, and this article explains the symptoms, root cause, and how to avoid it.

Date BugDateTimeFormatterJava
0 likes · 3 min read
Why Using ‘YYYY’ Instead of ‘yyyy’ Can Break Your Java Dates