CLDR YYYY

ISO week-based year.

2006

at the reference instant, Mon, Jan 2 2006, 3:04:05 PM MST

The year that owns the ISO week — differs from the calendar year around New Year (Dec 29 2003 is ISO 2004-W01-1). CLDR capital Y. THE classic bug: writing YYYY where yyyy was meant corrupts dates only in the year's final days, so it ships and then fires in production every January.

LanguageTokenCaveat
C / POSIX strftime%GPairs with %V; %g is its two-digit form. Using %Y next to %V is the classic New-Year bug.
CLDR / ICU patternYThe locale week-based year, which equals the ISO week-year only in ISO-week locales. Writing YYYY where you meant yyyy is the classic silent New-Year bug.
Java DateTimeFormatterYYYYWeek-based year, but localized like w — truly ISO only in ISO-week locales. Using it with plain dd/MM is the classic New-Year bug.
Moment.js formatGGGGPairs with W. Lowercase gggg is the locale week-year; GG is the two-digit form.
PHP date()oSame as Y except around New Year, when the ISO week belongs to the neighbouring year.
Python strftime%GPairs with %V; using %Y next to %V is the classic New-Year bug.
Ruby strftime%GPairs with %V; mixing %Y with %V is the classic New-Year bug. %g is its two-digit form.
Rust chrono%GPairs with %V; mixing %Y with %V is the classic New-Year bug. %g is the two-digit form.

Definition anchored to Unicode UTS #35 — Date Field Symbol Table.