@karmaniverous/rrstack
    Preparing search index...

    Function fromIsoDuration

    • Parse an ISO-8601 duration string into DurationParts.

      • Supports either PnW (weeks-only) or the standard PnYnMnDTnHnMnS form.
      • Integer-only components (no fractional values); throws on decimals.
      • Rejects invalid mixes (e.g., weeks together with other fields).

      Parameters

      • isoRaw: string

      Returns DurationParts

      If the string is invalid, mixed weeks with other units, uses decimals, or totals to zero.