UNPKG

@northguild/gmt

Version:

Date and time library for JavaScript and TypeScript, built on TC39 Temporal: time zones, DST, business days, ISO 8601 strings in and out. Never throws.

16 lines • 749 B
/** * Check whether two month-day strings (`--MM-DD`, or `MM-DD`) name the same day of the year. * * - Accepts both input forms, so `12-25` and `--12-25` are equal. * - The year is not part of a month-day: `--02-29` is not equal to `--02-28`. * - Returns `false` if either input is invalid or not in the ISO calendar. * * @param a month-day string * @param b month-day string * @returns `true` only when both are valid and name the same month and day, or `false` on invalid input * * @example areMonthDaysEqual("12-25", "--12-25") // true * @example areMonthDaysEqual("--02-29", "--02-28") // false * @example areMonthDaysEqual("--02-30", "--02-30") // false */ export declare function areMonthDaysEqual(a: string, b: string): boolean;