Skip to content

second

const second: RegExp = /^[0-5][0-9]$/;

RegExp matching a second of 00–59.

import { second } from "@northguild/gmt";
second.test("00") // true
second.test("30") // true
second.test("59") // true
second.test("60") // false (a leap second; GMT rejects it, see `leapSecond`)

regex/time.ts