@burglekitt/gmt
Version:
Temporal-based date and time utilities with timezone support and polyfill integration
14 lines (13 loc) • 445 B
TypeScript
/**
* Return the month (1-12) from a UTC datetime string.
*
* - Returns zero-padded string for month.
* - Returns "" for invalid input.
*
* @param value ISO UTC datetime string (e.g., "2024-03-17T14:30:45Z")
* @returns Month (01-12) or "" on invalid input
*
* @example parseMonthFromUtc("2024-03-17T14:30:45Z") // "03"
* @example parseMonthFromUtc("invalid") // ""
*/
export declare function parseMonthFromUtc(value: string): string;