
ISO 8601: The Date Format Standard That Almost Everyone Gets Subtly Wrong
ISO 8601 is the international standard for representing dates and times. Every developer has heard of it. Far fewer have actually read it. The result: code that parses 2026-03-24T08:00:00Z correctly but quietly breaks on 2026-03-24T08:00:00+00:00 . Or assumes that ISO 8601 date strings are always sortable. Or mixes up T08:00:00 and T080000 . Let's close the gaps. The Formats You Actually Need to Know Date Only 2026-03-24 ← Extended format (with hyphens) — most common 20260324 ← Basic format (no hyphens) — valid ISO, rare in APIs 2026-W12-2 ← Week date: year-W{week}-{day-of-week} (1=Mon, 7=Sun) 2026-083 ← Ordinal date: year-{day-of-year} Date and Time 2026-03-24T08:00:00 ← Local time (no offset — timezone unknown) 2026-03-24T08:00:00Z ← UTC (Z = +00:00) 2026-03-24T08:00:00+05:30 ← UTC+5:30 (India) 2026-03-24T08:00:00+0530 ← Also valid: colon in offset is optional 2026-03-24T08:00:00.000Z ← With milliseconds 2026-03-24T08:00:00.000000Z ← With microseconds What Many Developers Get Wrong:
Continue reading on Dev.to Tutorial
Opens in a new tab



