Parses an ISO 8601 duration string and returns the number of milliseconds Supports the format: P[n]D[T[n]H[n]M[n]S]
ISO 8601 duration string (e.g., "PT3H30M15S")
Duration in milliseconds
Error if the duration string is invalid
parseIsoDuration("PT1H30M"); // Returns 5400000 (1.5 hours in ms)parseIsoDuration("P1DT2H"); // Returns 93600000 (26 hours in ms) Copy
parseIsoDuration("PT1H30M"); // Returns 5400000 (1.5 hours in ms)parseIsoDuration("P1DT2H"); // Returns 93600000 (26 hours in ms)
Parses an ISO 8601 duration string and returns the number of milliseconds Supports the format: P[n]D[T[n]H[n]M[n]S]