Skip to content

parseMonthDayFromDate

parseMonthDayFromDate(value: string): string

Return the month-day (--MM-DD) of an ISO 8601 date string.

  • The year is dropped, so 2023-02-28 and 2024-02-28 give the same month-day.
  • Only the ISO calendar is read; a Hebrew or Islamic date gives "".
  • Returns "" for invalid input.
ParameterTypeDescription
valuestringISO date string

The canonical --MM-DD string, or "" on invalid input

import { parseMonthDayFromDate } from "@northguild/gmt/plain/parse";
parseMonthDayFromDate("2024-12-25") // "--12-25"
output 

plain/parse/parseMonthDayFromDate.ts

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.