# unix/calculate

Industry: Core

- [`addUnix`](/gmt/reference/unix/calculate/addUnix/): Add a temporal amount to a Unix epoch value and return the resulting epoch.
- [`diffUnix`](/gmt/reference/unix/calculate/diffUnix/): Return the difference between two Unix timestamps measured in the given unit.
- [`diffUnixAsDuration`](/gmt/reference/unix/calculate/diffUnixAsDuration/): Return the difference between two Unix timestamps as an ISO 8601 duration string, bridging to the `duration` namespace (see `parseDuration`, `normalizeDuration`).
- [`endOfQuarterForUnix`](/gmt/reference/unix/calculate/endOfQuarterForUnix/): Return the end of the quarter for a Unix timestamp.
- [`endOfUnix`](/gmt/reference/unix/calculate/endOfUnix/): Return the end of the specified unit for a Unix timestamp.
- [`isBetweenUnix`](/gmt/reference/unix/calculate/isBetweenUnix/): Return true when the Unix timestamp is between start and end (inclusive by default).
- [`maxUnix`](/gmt/reference/unix/calculate/maxUnix/): Return the latest (maximum) of the given Unix timestamp values.
- [`minUnix`](/gmt/reference/unix/calculate/minUnix/): Return the earliest (minimum) of the given Unix timestamp values.
- [`roundUnix`](/gmt/reference/unix/calculate/roundUnix/): Round a Unix timestamp to the specified unit.
- [`secondsUntilUnix`](/gmt/reference/unix/calculate/secondsUntilUnix/): Return the whole seconds from now until a stored Unix epoch, such as a JWT `exp`.
- [`setUnix`](/gmt/reference/unix/calculate/setUnix/): Return a Unix epoch value with the given `fields` set on `value`, interpreted in `timeZone`.
- [`sortUnix`](/gmt/reference/unix/calculate/sortUnix/): Sort an array of Unix timestamp values in ascending or descending order.
- [`startOfQuarterForUnix`](/gmt/reference/unix/calculate/startOfQuarterForUnix/): Return the start of the quarter for a Unix timestamp.
- [`startOfUnix`](/gmt/reference/unix/calculate/startOfUnix/): Return the start of the specified unit for a Unix timestamp.
- [`subtractUnix`](/gmt/reference/unix/calculate/subtractUnix/): Subtract a temporal amount from a Unix epoch value and return the resulting epoch.
