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 • 472 B
/** * Get the ISO week number of the current date. * * - Uses nowPlainDateTimeISO() to get current date in system timezone. * - Uses Temporal.PlainDate.weekOfYear for ISO week number. * - Returns null when system timezone is unavailable. * * @returns The ISO week number (1-53), or null on invalid * * @example getWeekOfYear() // 15 * @example getWeekOfYear() // null (when system timeZone unavailable) */ export declare function getWeekOfYear(): number | null;