Tools

ISO 8601 durations

Standard form
P1Y2M10DT2H30M
In words
1 year, 2 months, 10 days, 2 hours, 30 minutes
Exact length
Depends on the calendar: years and months have different lengths. Add a start date to see the exact end.

How the format works

A duration starts with P, then years (Y), months (M), weeks (W) and days (D). A T switches to the time part: hours (H), minutes (M) and seconds (S). So P3M is three months and PT3M is three minutes. Amounts must come in that order, and only the smallest one may have a decimal part, as in PT1.5H. A leading minus sign is accepted, although it is an extension to the standard.

An interval joins two parts with a slash: a start and an end, a start and a duration, or a duration and an end. Dates without an offset are read as UTC here. Years and months are not a fixed length, so a duration containing them has no exact number of seconds until you give a start date; with one, months are added by the calendar and the end of a month is respected.

Examples
TextMeaning
P1Y2M10DT2H30M1 year, 2 months, 10 days, 2 hours, 30 minutes
PT36H36 hours
P2W2 weeks
PT0.5Shalf a second
2026-11-07T12:00:00Z/P7Da week from a start
2026-01-01/2026-03-01start and end

To add time to a date without this notation, use the date calculator.

Tap anywhere for fullscreen