unixSeconds
const unixSeconds: RegExp = /^\d{10}$/;RegExp matching a Unix timestamp in seconds: exactly 10 digits.
Examples
Section titled “Examples”import { unixSeconds } from "@northguild/gmt";unixSeconds.test("1710511800") // trueunixSeconds.test("0000000000") // true (epoch)unixSeconds.test("9999999999") // true (2286-11-20T17:46:39Z)unixSeconds.test("999999999") // false (unpadded; 2001-09-09T01:46:39Z)unixSeconds.test("-1") // false (negative)unixSeconds.test("17105118001") // false (11 digits)Source
Section titled “Source”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.