Parse and build ISO 8601 durations like P1Y2M3DT4H5M6S. Enter components to build a duration, or paste a duration string to parse it into parts, total seconds, and a human-readable form.
Note: weeks (W) cannot combine with other components per RFC 3339 / ISO 8601. If weeks is non-zero, all other fields are ignored in output.
-PT5M) and fractional seconds (PT1.5S) are supported.
Uses calendar-aware arithmetic: years and months advance by real calendar months (e.g. Jan 31 + P1M → Feb 28/29).
ISO 8601 duration format: P[n]Y[n]M[n]DT[n]H[n]M[n]S — P is required, T separates date and time parts. Example: PT1H30M = 1 hour 30 minutes. Week form P[n]W is exclusive.
Common uses: Cache-Control max-age analogs, Kubernetes pod lifecycle, JSR-310 Duration, JavaScript Temporal.Duration, and config files.