Smart TimeUtilities

Developer Time Tools

ISO Duration Parser

Parse ISO 8601 duration strings.

Developer Time Tools
Parsed duration1d 2h 30m 0s

P1DT2H30M parsed into calendar and time components.

Years0

Calendar years.

Months0

Calendar months.

Weeks0

Seven-day week parts.

Days1

Calendar day parts.

Time2h 30m 0s

Time section after T.

Fixed seconds95,400

Exact for fixed units.

How to use this tool

  1. Paste an ISO 8601 duration such as PT45M or P1DT2H.
  2. Review the parsed years, months, days, hours, minutes and seconds.
  3. Use the approximate total seconds when the duration does not contain calendar months or years.

About this tool

ISO duration format

ISO 8601 durations use P for period and T before time parts, for example P2DT3H means two days and three hours.

Calendar ambiguity

Months and years do not have fixed second lengths, so totals involving them are shown as approximate.

Developer utility

This is useful when reading API responses, schedules, media metadata and automation rules.

Frequently asked questions

Why are month totals approximate?

A month can be 28, 29, 30 or 31 days. The parser reports the calendar parts exactly and marks fixed-unit totals as approximate when months or years are present.