@northguild/gmt
Version:
Date and time library for JavaScript and TypeScript, built on TC39 Temporal: time zones, DST, business days, ISO 8601 strings in and out. Never throws.
14 lines • 630 B
TypeScript
/**
* Return the current nanosecond for the specified IANA timeZone.
*
* - Uses nowZonedDateTimeISO() to get the current time.
* - Validation is performed on the timezone.
*
* @param ianaTimezone IANA name or UTC offset: a time zone identifier (`+05:30`, `+0530`, `-08`) or
* a stored offset (`±HH:MM[:SS]`, what `getTimeZoneOffset` returns)
* @returns current nanosecond string (zero-padded to 3 digits) or "" on invalid input
*
* @example getZonedNanosecond("Africa/Johannesburg") // "000"
* @example getZonedNanosecond("invalid") // ""
*/
export declare function getZonedNanosecond(ianaTimezone: string): string;