Skip to content

areDatesEqual

  • The core functions, which every industry uses.
areDatesEqual(value1: string, value2: string): boolean

Compare two ISO date-like strings for equality, ignoring time components.

  • Accepts both PlainDate and PlainDateTime strings.
  • Extracts date components only for comparison.
  • Returns false if either input is invalid.
ParameterTypeDescription
value1stringISO date-like string
value2stringISO date-like string

true if the dates are equal, false otherwise

import { areDatesEqual } from "@northguild/gmt/plain/compare";
areDatesEqual("2024-02-29", "2024-02-29T12:34:56") // true
output 

plain/compare/areDatesEqual.ts

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.