@burglekitt/gmt
Version:
Temporal-based date and time utilities with timezone support and polyfill integration
15 lines (14 loc) • 528 B
TypeScript
/**
* Return the day of week (1-7) from a UTC datetime string.
*
* - Monday=1 through Sunday=7.
* - Returns null for invalid input.
*
* @param value ISO UTC datetime string (e.g., "2024-03-17T14:30:45Z")
* @returns Day of week (1-7) or null on invalid input
*
* @example parseDayOfWeekFromUtc("2024-03-17T14:30:45Z") // 7
* @example parseDayOfWeekFromUtc("2024-03-18T00:00:00Z") // 1
* @example parseDayOfWeekFromUtc("invalid") // null
*/
export declare function parseDayOfWeekFromUtc(value: string): number | null;