Skip to content

getZonedMicrosecond

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

Return the current microsecond 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 microsecond string (zero-padded to 3 digits) or “” on invalid input

getZonedMicrosecond("America/New_York") // "000"
getZonedMicrosecond("invalid") // ""

zoned/get/getZonedMicrosecond.ts