Skip to content

worldwind-ui API / worldwind-kit / parseIsoDuration

Function: parseIsoDuration() ​

parseIsoDuration(text): number | null

Defined in: kit/src/time.ts:95

Parses an ISO 8601 duration (P1D, PT6H, P1M) into milliseconds. Months count as 30 days and years as 365, which is what a slider step needs. Returns null for anything else.

Parameters ​

text ​

string

Returns ​

number | null

MIT licensed. Not affiliated with NASA; WorldWind is NASA's open-source virtual globe.