Skip to content

duration/calculate

  • absDuration: Return the absolute value of an ISO 8601 duration string.
  • addDuration: Combine two ISO 8601 duration strings by addition.
  • durationAs: Express an ISO 8601 duration as a single fractional total in one unit.
  • getDurationSign: Report whether an ISO 8601 duration is negative, zero-length, or positive.
  • getDurationUnit: Read a single component out of an ISO 8601 duration string.
  • negateDuration: Flip the sign of an ISO 8601 duration string.
  • subtractDuration: Combine two ISO 8601 duration strings by subtraction.