Developer Tool
ISO 8601 durations look like P3Y6M4DT12H30M5S — paste one to see it in plain English, or build one from individual units below.
ISO 8601 durations show up in iCalendar (DURATION: fields), many REST APIs (subscription periods, token lifetimes, retry intervals), and XML Schema's duration type. The format is: P, then years/months/days, then — if there's a time component — T followed by hours/minutes/seconds. The T is what disambiguates months from minutes, since both use the letter M.
A duration in years, months, or weeks doesn't correspond to an exact number of seconds the way hours, minutes, and seconds do — a month can be 28 to 31 days. This tool converts using calendar-average lengths (30.44 days/month, 365.2425 days/year) for its total-duration estimate, which is the standard convention, but be aware it's an average, not an exact count for any specific calendar month.
Related
Hours and minutes between two specific times.
The exact day count between two real dates.
Check whether a date-time string is valid ISO 8601.