Skip to content

isAfterDate

isAfterDate(value1: string, value2: string): boolean

Return true if the first ISO PlainDate string represents a date after the second.

  • Uses Temporal.PlainDate.compare to compare dates.
  • Returns false if either input is invalid.
ParameterTypeDescription
value1stringfirst ISO PlainDate string
value2stringsecond ISO PlainDate string

boolean indicating whether value1 is after value2

import { isAfterDate } from "@northguild/gmt/plain/compare";
isAfterDate("2024-03-01", "2024-02-29") // true
output 

plain/compare/isAfterDate.ts