parseMonthDayFromDateTime
Signature
Section titled “Signature”parseMonthDayFromDateTime(value: string): stringReturn the month-day (--MM-DD) of an ISO 8601 date-time string.
- The year and the time are dropped, so the time never moves the day.
- A
Zor an offset gives""; a time zone annotation with no offset is ignored, asisValidDateTimereads it. - Only the ISO calendar is read.
- Returns "" for invalid input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | string | ISO date-time string |
Returns
Section titled “Returns”The canonical --MM-DD string, or "" on invalid input
Examples
Section titled “Examples”import { parseMonthDayFromDateTime } from "@northguild/gmt/plain/parse";
parseMonthDayFromDateTime("2024-12-25T10:00:00") // "--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.