ISO 8601 Date and Time Format Explained (2027)
ISO 8601 is the international standard for writing dates and times as numbers, biggest unit first: 2027-03-18 for March 18, 2027, and 2027-03-18T14:30:00-04:00 for 2:30 PM that day at four hours behind UTC. Because the year comes first and every field has a fixed width, an ISO date can be read the same way in every country and sorts correctly as plain text. The current edition is ISO 8601-1:2019, which “specifies representations of dates of the Gregorian calendar and times based on the 24-hour clock” (ISO). This guide covers the four kinds of ISO date (calendar, week, ordinal and the time stamp), durations like P3DT4H, the compact “basic” form, and the mistakes that break software, with every example computed for 2027. Facts are as of November 2026.
Key facts
- Standard: ISO 8601-1:2019, published February 2019, with Amendment 1 of 2022 (ISO catalogue).
- Calendar date: YYYY-MM-DD, such as 2027-03-18.
- Week date: YYYY-Www-D; March 18, 2027 is 2027-W11-4 (a Thursday).
- Ordinal date: YYYY-DDD; March 18, 2027 is 2027-077, the 77th day of the year.
- 2026 has 53 ISO weeks, so January 1-3, 2027 belong to ISO week 2026-W53 (our calculation).
Why year first?
Writing 03/04/2027 means March 4 in the US and 3 April in the UK and much of the world. ISO 8601 avoids the problem by ordering units from largest to smallest and always using four digits for the year and two for month and day. A side effect is that the text sorts in time order. RFC 3339, the internet profile of ISO 8601, says that when timestamps share the same time zone and fraction length, “the date and time strings may be sorted as strings,” and “a time-ordered sequence will result” (RFC 3339, section 5.1). That is why file names like 2027-03-18-report.pdf line up neatly in a folder.
The four ways to write a date
| Form | Pattern | March 18, 2027 | December 31, 2027 |
|---|---|---|---|
| Calendar date | YYYY-MM-DD | 2027-03-18 | 2027-12-31 |
| Calendar date, basic form | YYYYMMDD | 20270318 | 20271231 |
| Week date | YYYY-Www-D | 2027-W11-4 | 2027-W52-5 |
| Ordinal date | YYYY-DDD | 2027-077 | 2027-365 |
Python’s documentation names the same forms when it lists what its parser accepts: the basic form (its example is '20191204'), week dates ('2021-W01-1') and, as a format it does not yet read, “Ordinal dates … (YYYY-OOO)” (Python datetime docs). All values in the table were computed with Python’s isocalendar() and day-of-year functions; by hand, March 18 is day 31 + 28 + 18 = 77.
Week dates: the part people get wrong
ISO weeks start on Monday, and week 1 is the week that contains the year’s first Thursday. ISO’s own text is paid, so we quote the rule from Python’s documentation, which implements it: “The first week of an ISO year is the first (Gregorian) calendar week of a year containing a Thursday.” The consequence is that the first few days of January can belong to the previous ISO year, and the last few days of December to the next one. 2027 is a live example:
| Date | Weekday | ISO week date | Ordinal date |
|---|---|---|---|
| 2026-12-28 | Monday | 2026-W53-1 | 2026-362 |
| 2026-12-31 | Thursday | 2026-W53-4 | 2026-365 |
| 2027-01-01 | Friday | 2026-W53-5 | 2027-001 |
| 2027-01-03 | Sunday | 2026-W53-7 | 2027-003 |
| 2027-01-04 | Monday | 2027-W01-1 | 2027-004 |
| 2027-12-31 | Friday | 2027-W52-5 | 2027-365 |
| 2028-01-01 | Saturday | 2027-W52-6 | 2028-001 |
So in software, the ISO week-numbering year (%G in many date libraries) is not always the calendar year (%Y). Mixing them produces dates like “2027-W53”, which does not exist: our scan of 2020-2032 found 53-week years only in 2020, 2026 and 2032. Today’s week number is on our week number page.
Times and time zones
A full ISO timestamp joins the date and the time with a T. RFC 3339 defines the strict internet version: date-time = full-date "T" full-time, with the offset either “Z” for UTC or a numeric offset (RFC 3339, section 5.6). The same moment in three cities on March 18, 2027:
| Local time | ISO 8601 / RFC 3339 | Same instant in UTC |
|---|---|---|
| 2:30 PM in Toronto (EDT) | 2027-03-18T14:30:00-04:00 | 2027-03-18T18:30:00Z |
| 11:30 AM in Vancouver (UTC-7) | 2027-03-18T11:30:00-07:00 | 2027-03-18T18:30:00Z |
| 12:00 AM, March 19 in Kolkata | 2027-03-19T00:00:00+05:30 | 2027-03-18T18:30:00Z |
An offset is not a time zone: -04:00 says nothing about whether the place changes its clocks. Our guide to how to write time zones covers offsets, zone names and the “Z”, and when to store a zone ID like America/Toronto alongside the offset. RFC 3339 also allows “-00:00” to say that UTC is known but the local offset is not.
The W3C’s widely used profile (submitted in 1997, current version dated 1998) lists six levels of precision, from “Year: YYYY (eg 1997)” to “Complete date plus hours, minutes, seconds and a decimal fraction of a second: YYYY-MM-DDThh:mm:ss.sTZD (eg 1997-07-16T19:20:30.45+01:00)” (W3C NOTE-datetime). Midnight, the 24-hour clock and why 24:00 exists are covered in our 24-hour time chart.
Durations: P3DT4H and friends
ISO 8601 writes a length of time with a leading P (period), then years, months, days, a T, then hours, minutes and seconds. The W3C XML Schema standard, whose duration concept is, in its words, “drawn from those of [ISO 8601]”, says its forms are “more or less based on the pattern” “PnYnMnDTnHnMnS” and gives “15 days” as “‘P15D'” (W3C XML Schema 1.1 Part 2, section 3.3.6).
| Duration | Meaning |
|---|---|
| P15D | 15 days |
| PT90M | 90 minutes (the T is required before time parts) |
| P3DT4H | 3 days and 4 hours |
| P1Y2M | 1 year and 2 months |
| P2W | 2 weeks |
The catch is that months and years are not fixed lengths. The XML Schema standard says “P1M is incomparable with P31D”. We tested adding one month to January 31, 2027: Python’s dateutil library returns February 28, while JavaScript’s setUTCMonth rolls over to March 3 (Node.js 22). So for billing periods it is safer to store both a start date and an end date. P1M vs PT1M (one month vs one minute) is the classic typo.
Common mistakes
- Two-digit years. 27-03-18 is not ISO 8601; always use four digits.
- Missing leading zeros. 2027-3-8 breaks sorting; write 2027-03-08.
- Slashes or dots. 2027/03/18 is readable but not the standard form; the separator is a hyphen.
- A space instead of T. RFC 3339 lets applications use “a space character” for readability, but strict parsers may reject it.
- Calendar year vs week year. See the January 1-3, 2027 rows above.
- Local time with no offset. 2027-03-14T02:30 does not exist in New York: clocks jump from 2:00 to 3:00 AM that morning. Add the offset, or use UTC.
How we checked
Every date, week and ordinal value was computed with Python 3 (date.isocalendar() and timetuple().tm_yday) and cross-checked by hand. The time stamps were computed with zoneinfo on IANA tzdata 2026f. The month-addition test was run in Python (dateutil) and Node.js 22. The 53-week years were found by testing December 28 of each year from 2020 to 2032 (it always falls in the last ISO week). Quotes come from the ISO catalogue page, RFC 3339, the W3C note and XML Schema, and the Python documentation, read on November 9, 2026. The ISO standard itself is a paid document; we did not quote its text.
Sources
- ISO 8601-1:2019 catalogue page (ISO)
- RFC 3339: Date and Time on the Internet: Timestamps
- W3C: Date and Time Formats (NOTE-datetime, submitted 1997, version of 1998)
- W3C XML Schema Definition Language 1.1 Part 2: Datatypes
- Python documentation: datetime
- IANA time zone database (release 2026f)
Frequently asked questions
What is the ISO 8601 date format?
YYYY-MM-DD, year first, with hyphens and leading zeros: 2027-03-18.
What does the T mean in 2027-03-18T14:30:00Z?
It separates the date from the time. The Z at the end means UTC.
Which week is January 1, 2027 in?
ISO week 53 of 2026 (2026-W53-5), because 2027’s first Thursday is January 7, so ISO week 1 of 2027 starts on Monday, January 4.
Is ISO 8601 the same as RFC 3339?
RFC 3339 is a profile of ISO 8601 for internet timestamps: it uses only the full date-time form with an offset. ISO 8601 also covers week dates, ordinal dates, durations and the basic format, which RFC 3339 leaves out. RFC 3339 does allow a few conveniences, such as a lowercase t or a space separator, that strict ISO parsers may reject.
How do I write a duration of 1 hour 30 minutes?
PT1H30M, or PT90M.