hour
const hour: RegExp = /^(0[0-9]|1[0-9]|2[0-3])$/;RegExp matching an ISO 8601 hour in extended format: 00–23.
Examples
Section titled “Examples”import { hour } from "@northguild/gmt";hour.test("00") // truehour.test("12") // truehour.test("23") // truehour.test("24") // false (out of range)hour.test("9") // false (not zero-padded)