@burglekitt/gmt
Version:
Temporal-based date and time utilities with timezone support and polyfill integration
14 lines (13 loc) • 536 B
TypeScript
/**
* Returns the local plain datetime (date + time) extracted from a zoned datetime string.
*
* - Extracts both date and time components from a ZonedDateTime.
* - Returns "" for invalid input.
*
* @param value ISO 8601 zoned datetime string
* @returns Local plain datetime string or "" for invalid
*
* @example chopZonedTimezone("2024-02-29T14:30:45.123-05:00[America/New_York]") // "2024-02-29T14:30:45.123"
* @example chopZonedTimezone("invalid") // ""
*/
export declare function chopZonedTimezone(value: string): string;