Your files stay on your device

ISO 8601 duration parser and formatter

Read and write ISO 8601 durations like P1DT2H.

Type a duration to read it.

Days and weeks are exact (1 day is 24 hours). Years and months stay as parts. Fractions below a millisecond are cut off, not rounded up.

P1M is a month, PT1M is a minute

In an ISO 8601 duration, the letters before T name date parts and the letters after T name time parts. P1M is one month, and PT1M is one minute. Years and months stay as parts because a month can be 28 to 31 days, so no fixed millisecond total exists for it.

Days and weeks are exact in this tool, so P1D equals 24 hours. P1DT2H is 26 hours. Only the last part may carry a fraction, so PT90.5S is valid while PT1.5H30M is not.

P1WOne week, which must stand alone
PT30MThirty minutes
-PT90.5SNegative 90.5 seconds

Was this tool useful?