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 • 501 B
/** * Return the current ISO day of the week as a number in the system timeZone. * * - Uses nowZonedDateTimeISO() to get current day in system timezone. * - Returns ISO day of week: 1 (Monday) to 7 (Sunday). * - Returns null when system timezone is unavailable. * * @returns current ISO day of week number (1-7) or null on invalid * * @example getDayOfWeek() // 4 * @example getDayOfWeek() // null (when system timeZone unavailable) */ export declare function getDayOfWeek(): number | null;