UNPKG

@burglekitt/gmt

Version:

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

14 lines (13 loc) 441 B
/** * Return the year from a UTC datetime string. * * - Returns the year as a string (e.g., "2024"). * - Returns "" for invalid input. * * @param value ISO UTC datetime string (e.g., "2024-03-17T14:30:45Z") * @returns Year (YYYY) or "" on invalid input * * @example parseYearFromUtc("2024-03-17T14:30:45Z") // "2024" * @example parseYearFromUtc("invalid") // "" */ export declare function parseYearFromUtc(value: string): string;