CLDR yyyy

Four-digit year.

2006

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

The calendar year, all digits (2006). CLDR's y grows as needed while yyyy zero-pads to four; most token languages only offer the four-digit form.

LanguageTokenCaveat
C / POSIX strftime%YNo fixed width — just the year as a decimal number.
C# custom formatyyyy
CLDR / ICU patternyMinimum digits, so 2026 prints in full; yyyy zero-pads to four. Do not reach for YYYY — that is the week-based year.
Go time layout2006
Java DateTimeFormatteruuuuProleptic year — the javadoc's plain 'year'. yyyy is year-of-era: same output on ISO CE dates, different for BCE and other chronologies. Pick one deliberately.
JavaScript Intl.DateTimeFormatyear: "numeric"
Moment.js formatYYYY
PHP date()YAt least four digits; years BCE get a leading minus sign.
Python strftime%YNot zero-padded below year 1000 on all platforms.
Ruby strftime%YZero-padded, includes the century.
Rust chrono%YZero-padded to four digits; proleptic Gregorian, so negative years are possible.

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