MCPcopy Create free account
hub / github.com/Effect-TS/effect / formatIso

Function formatIso

packages/effect/src/Duration.ts:967–970  ·  view source on GitHub ↗
(self: DurationInput)

Source from the content-addressed store, hash-verified

965 * @category conversions
966 */
967export const formatIso = (self: DurationInput): Option.Option<string> => {
968 const duration = decode(self)
969 return isFinite(duration) ? Option.some(unsafeFormatIso(duration)) : Option.none()
970}
971
972/**
973 * Parses an ISO8601 duration string into a `Duration`.

Callers

nothing calls this directly

Calls 3

isFiniteFunction · 0.85
unsafeFormatIsoFunction · 0.85
decodeFunction · 0.70

Tested by

no test coverage detected