ISO 8601 Duration Converter
Convert between a duration string and seconds. Examples: P1Y2M3DT4H5M6S, P1W, PT1H30M. Years use 365 days and months use 30 days as approximations.

ISO 8601 기간 문자열↔초

ISO 8601 expresses a duration as "PnYnMnDTnHnMnS": after P come years/months/weeks/days, after T come hours/minutes/seconds. This tool converts between that human-readable string and the seconds value machines use.

Years use 365 days and months use 30 days as approximations (without a reference date the real month length is unknown). Computation is local.

Features

How to use

  1. Enter a duration string (e.g. P1DT12H) in the top box to get seconds.
  2. Enter seconds in the bottom box to get an ISO duration string.

FAQ

Why is "1 month" only approximate in seconds?

Different months have different lengths (28/29/30/31), and without a specific reference date the real month length cannot be determined, so this tool uses 30 days; years and months are for rough conversion only — for exact durations use days/hours/minutes/seconds.

Can P1Y2M3DT4H5M6S be round-tripped?

Yes. As long as you do not mix approximate units like month/year, the round trip is consistent and exact; conversions involving years/months carry rounding error from the approximation.

Related tools & reading

피드백

이 사이트는 프론트엔드 전용으로 백엔드나 계정 시스템이 없으며, 피드백은 GitHub Issues·Discussion·이메일로 받습니다.

이슈나 이메일에 붙여넣으면 문제 파악에 도움이 되며, 입력 내용은 포함되지 않습니다

Also: 기존 피드백 보기 · 이메일 피드백(GitHub 계정 불필요):278975598@qq.com