UNPKG

@burglekitt/gmt

Version:

Temporal-based date and time utilities with timezone support and polyfill integration

17 lines (16 loc) 607 B
/** * Return the week number from a UTC datetime string. * * - By default uses ISO weeks (Monday-based). * - Returns null for invalid input. * * @param value ISO UTC datetime string (e.g., "2024-03-17T14:30:45Z") * @param optionsArg optional: weekStartsOn ("monday" | "sunday") for week calculations * @returns Week number (1-53) or null on invalid input * * @example parseWeekFromUtc("2024-03-17T14:30:45Z") // 11 * @example parseWeekFromUtc("invalid") // null */ export declare function parseWeekFromUtc(value: string, optionsArg?: { weekStartsOn?: "monday" | "sunday"; }): number | null;