UNPKG

@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.

13 lines • 462 B
/** * Return the current year from UTC as a zero-padded string. * * - Uses nowInstant() converted to UTC zoned date time. * - Returns zero-padded string to 4 digits. * - A year outside 0000–9999 is written with a sign and six digits (`+010000`, `-000005`), as * Temporal writes it at the head of a date. * * @returns current year string (zero-padded to 4 digits) * * @example getUtcYear() // "2024" */ export declare function getUtcYear(): string;