Skip to content

getZonedMinute

getZonedMinute(ianaTimezone: string): string
import { getZonedMinute } from "@northguild/gmt/zoned/get";

Return the current minute for the specified IANA timeZone.

  • Uses Temporal.Now.zonedDateTimeISO to get the current time.
  • Validation is performed on the timezone.
Parameter Type Description
ianaTimezone string IANA timeZone identifier

current minute string (zero-padded to 2 digits) or “” on invalid input

getZonedMinute("America/New_York") // "00"
getZonedMinute("invalid") // ""

zoned/get/getZonedMinute.ts