Duration parser

Convert duration notation and apply it to a date.

About this tool

Convert PT1H30M, 1h 30m or 01:30:00 immediately and copy the ISO value. Two clock parts mean minutes:seconds; three mean hours:minutes:seconds. A leading minus applies to the whole duration.

Here days are fixed 24-hour periods and weeks are seven such days, including across clock changes. Years and months are calendar units: applied first in the browser’s local timezone, clamped to the month’s last day, then followed by the fixed part. Their actual elapsed hours therefore depend on the reference date. This is the tool’s explicit conversion convention, not a universal seconds value for ISO calendar durations.

Compact units: y mo w d h m s; m is minutes, mo is months. ISO P1M is a month, PT1M a minute; ISO weeks must stand alone. All components are nonnegative whole numbers except seconds (up to three decimal places). Input is limited to 256 characters and safe integer fixed milliseconds. Reference input has minute precision; a nonexistent local clock time is rejected, a repeated time selects its earlier occurrence. Results must fit the browser date range.