Skip to content

isBeforeTime

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

Return true when value1 is strictly before value2 for PlainTime values.

  • Uses Temporal.PlainTime.compare to compare times.
  • Returns false if either input is invalid.
ParameterTypeDescription
value1stringISO PlainTime string for the first value
value2stringISO PlainTime string for the second value

boolean indicating whether value1 < value2

import { isBeforeTime } from "@northguild/gmt/plain/compare";
isBeforeTime("12:34:56", "13:34:56") // true
output 

plain/compare/isBeforeTime.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.