instantLeapSecond
const instantLeapSecond: RegExp = /^[^[]*?[Tt ]\d{2}:?\d{2}:?60(?:[.,]\d+)?[-+Zz[]/;RegExp fragment matching an ISO 8601 leap second in every shape Temporal.Instant.from accepts.
Examples
Section titled “Examples”import { instantLeapSecond } from "@northguild/gmt";instantLeapSecond.test("2016-12-31T23:59:60Z") // trueinstantLeapSecond.test("2016-12-31 23:59:60Z") // true (space separator)instantLeapSecond.test("20161231t235960Z") // true (basic format)instantLeapSecond.test("2016-12-31T23:59:59Z") // false (second = 59)instantLeapSecond.test("2016-12-31T23:59:60") // false (no designator, so not an instant)instantLeapSecond.test("2024-01-01T00:00:00Z[x=T123460Z]") // false (inside an annotation value)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.