How to use ISO duration
- 1. Paste a duration. P1DT2H30M or PT30M.
- 2. Read parts and ms. Years/months use fixed averages.
- 3. Test two ISO intervals. Overlap is a1 < b2 && b1 < a2.
- 4. No RRULE. Recurrence is a different tool.
About this tool
ISO-8601 durations appear in invoices, SLAs, and Temporal polyfills. This parser understands PnYnMnWnDTnHnMnS and can tell whether two timestamp ranges overlap.
Years and months
A year is 365d and a month is 30.4375d. Use calendar math for civil months.
Overlap
Invalid timestamps throw. Equal endpoints do not overlap (half-open).
Code examples
Duration
P1DT2H