parseMonthDay
Signature
Section titled “Signature”parseMonthDay(value: string): stringReturn the canonical --MM-DD form of an ISO month-day string.
- Reads
--MM-DDandMM-DD; writes--MM-DD. The reference year 1972 is never written. - The extended form only:
--1225and1225are refused. - Annotations are read as
isValidMonthDayreads them: elective and time zone annotations are ignored, an unknown critical one refuses, andu-camust beiso8601in any case. --02-29is valid;--02-30and--04-31are not.- Returns "" for invalid input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | string | ISO month-day string |
Returns
Section titled “Returns”the --MM-DD string, or "" on invalid input
Examples
Section titled “Examples”import { parseMonthDay } from "@northguild/gmt/plain/parse";
parseMonthDay("--12-25") // "--12-25"Source
Section titled “Source”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.