BetaISO 8601 date/time handling functionality.
npm i @svta/cml-iso-8601
import {
decodeIso8601Duration,
encodeIso8601Duration,
} from "@svta/cml-iso-8601";
// Encode duration
const encoded = encodeIso8601Duration(3661);
// encoded === 'PT1H1M1S'
// Decode duration
const decoded = decodeIso8601Duration("PT1H1M1S");
// decoded === 3661
A collection of tools for working with ISO 8601 time values.