ISO 8601 Duration Parser

Paste a standard ISO 8601 duration — it's checked and broken down as you type.

Examples

How it works

An ISO 8601 duration starts with P ("period"), followed by date components (Years, Months, Days) and, after a T separator, time components (Hours, Minutes, Seconds). The letter M means months before the T and minutes after it — P1M is one month, PT1M is one minute — so which side of the T a value falls on changes what it means.

The standalone week form (P2W) is also supported, but only on its own: ISO 8601 treats it as an alternate way to write a duration, not one more unit alongside years, months or days, so this parser rejects P2W3D rather than guess at a combined meaning the spec itself doesn't define.

The total-seconds figure is a documented approximation, not an exact conversion: a year is treated as 365 days and a month as 30 days, since neither has a fixed length in a real calendar (leap years, and months of 28–31 days, make an exact answer depend on which year and month you start from). Treat it as a useful estimate, not a value to add to a specific calendar date.