getZonedMillisecond
Signature
Section titled “Signature”getZonedMillisecond(ianaTimezone: string): stringReturn the current millisecond for the specified IANA timeZone.
- Uses Temporal.Now.zonedDateTimeISO to get the current time.
- Validation is performed on the timezone.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
ianaTimezone | string | IANA name or UTC offset: a time zone identifier (+05:30, +0530, -08) or a stored offset (±HH:MM[:SS], what getTimeZoneOffset returns) |
Returns
Section titled “Returns”current millisecond string (zero-padded to 3 digits) or "" on invalid input
Examples
Section titled “Examples”import { getZonedMillisecond } from "@northguild/gmt/zoned/get";
getZonedMillisecond("America/New_York") // "000"