localizationinternationalizationdatetime-formatiso8601

Standardized format for a non-specific time interval


I'm currently localizing a website, and part of the information presented is the length of an audio file. Let's say the length of the file is 06:47:58 (6 hours, 47 minutes, 58 seconds).

Is there a standard to localize non-specific time intervals to, like dates? I see ISO-8601 has a date-specific time interval (aka between date A time 1 to date B time 2), but nothing about general time.

Thank you for the help


Solution

  • Many years later, there's a standardized Intl.DurationFormat. Currently available in Chrome/Edge 129, and Safari 16.4. No support yet in Firefox.