@burglekitt/gmt
Version:
Temporal-based date and time utilities with timezone support and polyfill integration
15 lines (14 loc) • 543 B
TypeScript
/**
* Return the current day of week for the specified IANA timeZone.
*
* - Uses Temporal.Now.zonedDateTimeISO to get the current time.
* - Returns 1-7 (Monday=1 through Sunday=7).
* - Validation is performed on the timezone.
*
* @param ianaTimezone IANA timeZone identifier
* @returns current day of week number (1-7) or null on invalid input
*
* @example getZonedDayOfWeek("America/New_York") // 3
* @example getZonedDayOfWeek("invalid") // null
*/
export declare function getZonedDayOfWeek(ianaTimezone: string): number | null;