UNPKG

@burglekitt/gmt

Version:

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

14 lines (13 loc) 405 B
/** * Return the month (1-12) for a given ISO 8601 date string. * * - Returns zero-padded string for month. * - Returns "" for invalid input. * * @param value ISO date string * @returns Month (01-12) or "" on invalid input * * @example parseMonthFromDate("2024-03-15") // "03" * @example parseMonthFromDate("invalid") // "" */ export declare function parseMonthFromDate(value: string): string;