Skip to content

plain/compare

  • The core functions, which every industry uses.
  • areDatesEqual: Compare two ISO date-like strings for equality, ignoring time components.
  • areDatesEqualBy: Compare two ISO date strings for equality at a given calendar unit.
  • areDateTimesEqual: Return true if two PlainDateTime ISO strings represent the same instant of local date/time components.
  • areDateTimesEqualBy: Compare two ISO datetime strings for equality at a given unit.
  • areMonthDaysEqual: Check whether two month-day strings (--MM-DD, or MM-DD) name the same day of the year.
  • areTimesEqual: Return true if two PlainTime ISO strings represent the same time components.
  • areYearMonthsEqual: Check whether two year-month strings (YYYY-MM) name the same year and month.
  • compareMonthDays: Compare two month-day strings (--MM-DD, or MM-DD) in calendar order: month first, then day.
  • compareYearMonths: Compare two year-month strings (YYYY-MM) in calendar order: year first, then month.
  • isAfterDate: Return true if the first ISO PlainDate string represents a date after the second.
  • isAfterDateTime: Return true when value1 is strictly after value2 for PlainDateTime values.
  • isAfterTime: Return true when value1 is strictly after value2 for PlainTime values.
  • isBeforeDate: Return true when value1 is strictly before value2 for PlainDate values.
  • isBeforeDateTime: Return true when value1 is strictly before value2 for PlainDateTime values.
  • isBeforeTime: Return true when value1 is strictly before value2 for PlainTime values.
  • isBetweenDate: Return true when date is between start and end (inclusive by default).
  • isBetweenDateTime: Return true when dateTime is between start and end (inclusive by default).
  • isBetweenTime: Return true when time is between start and end (inclusive by default).
  • isBusinessDay: Return true when value is a working day in calendar.
  • isFuture: Return true when value is strictly after today, per the system clock and system timeZone.
  • isPast: Return true when value is strictly before today, per the system clock and system timeZone.
  • isRelativeDay: Return true when value falls offsetDays days from today, per the system clock and system timeZone.
  • isThisUnit: Return true when value falls in the same unit as today, per the system clock and system timeZone.
  • isWeekend: Return true when value falls on a weekend day for locale.

Last updated:

Accessibility
© 2026 NorthGuild · Licences

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.