Skip to content

maxUnix

  • The core functions, which every industry uses.
maxUnix(unixValues: (string | number)[]): number | null

Return the latest (maximum) of the given Unix timestamp values.

  • Drops values that are not unix epochs first: anything that is not a safe integer or a string of optionally negative ASCII digits, and values outside the Temporal instant range (±8.64e15, which contains every seconds and milliseconds epoch).
  • Returns null if array is empty or has no valid values.
ParameterTypeDescription
unixValues(string | number)[]Array of Unix epochs as numbers or digit strings (e.g. 1699531200 or “1699531200”); digit strings are returned as numbers

The latest Unix timestamp, or null on invalid input

import { maxUnix } from "@northguild/gmt/unix/calculate";
maxUnix([1706659200000, 1704067200000, 1700000000000]) // 1706659200000
unixValues
output 

unix/calculate/maxUnix.ts

Accessibility
© 2026 NorthGuild · Licences

Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.