Skip to content

minDate

  • The core functions, which every industry uses.
minDate(dates: string[]): string | null

Return the earliest (minimum) of the given PlainDate values.

  • Returns null if the array is empty or contains no valid dates.
  • Validation is performed on each item in the array.
ParameterTypeDescription
datesstring[]Array of ISO PlainDate strings (e.g. “2024-03-10”)

The earliest date string, or null on invalid input

import { minDate } from "@northguild/gmt/plain/calculate";
minDate(["2024-03-10", "2024-03-15", "2024-03-12"]) // "2024-03-10"
dates
output 

plain/calculate/minDate.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.