Vinyl
    Preparing search index...
    • Parses an ISO 8601 duration into seconds. The accepted format is P(n)Y(n)M(n)DT(n)H(n)M(n)S

      All units shall have a fixed size.

      P - Period designator, precedes all durations. 1Y (Year) = 365 * 24 * 60 * 60 Seconds 1M (Month) = 30 * 24 * 60 * 60 Seconds 1D (Day) = 24 * 60 * 60 Seconds

      T - Time designator, precedes all time components. 1H (Hour) = 60 * 60 Seconds 1M (Minute) = 60 Seconds 1S (Second)

      Parameters

      • value: string

      Returns number

      Returns the duration in seconds or throws an ValidationError if not properly formatted.