Skip to content

maxTime

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

Return the latest (maximum) of the given PlainTime values.

  • Returns null if the array is empty or contains no valid times.
  • Validation is performed on each item in the array.
ParameterTypeDescription
timesstring[]Array of ISO PlainTime strings (e.g. “14:30:00”)

The latest time string, or null on invalid input

import { maxTime } from "@northguild/gmt/plain/calculate";
maxTime(["14:30:00", "09:00:00", "20:45:00"]) // "20:45:00"
times
output 

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