UNPKG

@burglekitt/gmt

Version:

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

14 lines (13 loc) 495 B
/** * Extract the date portion from a UTC datetime string. * * - Uses Temporal.Instant.from to parse, converts to UTC date. * - Returns "" for invalid input. * * @param value ISO UTC datetime string (e.g., "2024-03-17T14:30:45Z") * @returns ISO date string (e.g., "2024-03-17") or "" on invalid input * * @example parseDateFromUtc("2024-03-17T14:30:45Z") // "2024-03-17" * @example parseDateFromUtc("invalid") // "" */ export declare function parseDateFromUtc(value: string): string;