Skip to content

day

  • The core functions, which every industry uses.
const day: RegExp = /^(0[1-9]|[12][0-9]|3[01])$/;

RegExp matching an ISO 8601 day of the month: 01–31 (shape only; whether the day exists in its month is checked by Temporal.PlainDate.from in isValidDate).

import { day } from "@northguild/gmt";
day.test("01") // true
day.test("31") // true
day.test("32") // false (out of range)
day.test("00") // false (day zero)
day.test("9") // false (not zero-padded)

regex/date.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.