CLDR ww
Week of year.
1
at the reference instant, Mon, Jan 2 2006, 3:04:05 PM MST
The week number. TRAP FIELD: ISO-8601 weeks (Monday start, week 1 contains the first Thursday) differ from US-style weeks (Sunday start) and from CLDR's locale-dependent w. Tokens that look alike disagree — every language's note here says which system it counts.
| Language | Token | Caveat |
|---|---|---|
| C / POSIX strftime | %V | ISO-8601 week [01,53]. %U (Sunday-first) and %W (Monday-first) count from 00 and disagree with it around New Year. |
| CLDR / ICU pattern | w | Locale week rules (first day of week plus minimum days in week one), not necessarily ISO; ww zero-pads. Pair it with Y, never y. |
| Java DateTimeFormatter | w | Week of week-based year via WeekFields.of(locale) — Monday/ISO in most of Europe, Sunday-first under en-US. Pair with Y, never with u or y. |
| Moment.js format | W | ISO week; WW zero-pads. Lowercase w/ww are locale weeks and count differently — not the same field. |
| PHP date() | W | ISO-8601 week, Monday start, zero-padded to two digits (the manual's example 42 hides the padding). Pairs with o, not Y. |
| Python strftime | %V | ISO-8601 week. %U (Sunday-first) and %W (Monday-first) count differently — all three disagree around New Year. |
| Ruby strftime | %V | ISO-8601 week, range 1..53. %U (Sunday-first) and %W (Monday-first) count 0..53 and disagree around New Year. |
| Rust chrono | %V | ISO-8601 week (01–53; week 0 does not exist). %U (Sunday-first) and %W (Monday-first) count from 00 and disagree around New Year. |
Definition anchored to ISO 8601 (via Wikipedia overview).