areMonthDaysEqual
Signature
Section titled “Signature”areMonthDaysEqual(a: string, b: string): booleanCheck whether two month-day strings (--MM-DD, or MM-DD) name the same day of the year.
- Accepts both input forms, so
12-25and--12-25are equal. - The year is not part of a month-day:
--02-29is not equal to--02-28. - Returns
falseif either input is invalid or not in the ISO calendar.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
a | string | month-day string |
b | string | month-day string |
Returns
Section titled “Returns”true only when both are valid and name the same month and day, or false on invalid input
Examples
Section titled “Examples”import { areMonthDaysEqual } from "@northguild/gmt/plain/compare";
areMonthDaysEqual("12-25", "--12-25") // trueSource
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.