# duration

Industry: Core

## [calculate](/gmt/reference/duration/calculate/)

- [`absDuration`](/gmt/reference/duration/calculate/absDuration/): Return the absolute value of an ISO 8601 duration string.
- [`addDuration`](/gmt/reference/duration/calculate/addDuration/): Combine two ISO 8601 duration strings by addition.
- [`durationFromUnits`](/gmt/reference/duration/calculate/durationFromUnits/): Write an amount given as a unit object, such as `{ minutes: 15 }`, as an ISO 8601 duration string.
- [`getDurationSign`](/gmt/reference/duration/calculate/getDurationSign/): Report whether an ISO 8601 duration is negative, zero-length, or positive.
- [`getDurationUnit`](/gmt/reference/duration/calculate/getDurationUnit/): Read a single component out of an ISO 8601 duration string.
- [`negateDuration`](/gmt/reference/duration/calculate/negateDuration/): Flip the sign of an ISO 8601 duration string.
- [`subtractDuration`](/gmt/reference/duration/calculate/subtractDuration/): Combine two ISO 8601 duration strings by subtraction.
- [`totalDuration`](/gmt/reference/duration/calculate/totalDuration/): Express an ISO 8601 duration as a single fractional total in one unit.
- [`totalUnits`](/gmt/reference/duration/calculate/totalUnits/): Express an amount written as a unit object, such as `{ minutes: 15 }`, as a single fractional total in one unit.
- [`totalUnitsFromNow`](/gmt/reference/duration/calculate/totalUnitsFromNow/): Express a length of time from now as one fractional total in one unit.
- [`ttlFromNow`](/gmt/reference/duration/calculate/ttlFromNow/): Express one length of time from now in every form a receiver wants: seconds, milliseconds, a Unix epoch, an HTTP date and a UTC string.

## [compare](/gmt/reference/duration/compare/)

- [`compareDurations`](/gmt/reference/duration/compare/compareDurations/): Compare two ISO 8601 duration strings by length.

## [format](/gmt/reference/duration/format/)

- [`formatDuration`](/gmt/reference/duration/format/formatDuration/): Render an ISO 8601 duration string as a locale-aware, human-readable string.
- [`formatHumanDuration`](/gmt/reference/duration/format/formatHumanDuration/): Write an ISO 8601 duration in the compact form `parseHumanDuration` reads, such as `2h 30m`.

## [normalize](/gmt/reference/duration/normalize/)

- [`normalizeDuration`](/gmt/reference/duration/normalize/normalizeDuration/): Roll an ISO 8601 duration string's small units into larger ones.

## [parse](/gmt/reference/duration/parse/)

- [`parseDuration`](/gmt/reference/duration/parse/parseDuration/): Parse and re-normalize an ISO 8601 duration string.
- [`parseHumanDuration`](/gmt/reference/duration/parse/parseHumanDuration/): Read a duration written the way people write it, such as `2h 30m`, `1.5h` or `3 days`, into an ISO 8601 duration string.

## [validate](/gmt/reference/duration/validate/)

- [`isValidDuration`](/gmt/reference/duration/validate/isValidDuration/): Return true if `value` is a valid ISO 8601 duration string.
