@burglekitt/gmt
Version:
Temporal-based date and time utilities with timezone support and polyfill integration
15 lines (14 loc) • 562 B
TypeScript
/**
* Parse a zoned datetime and return the plain local datetime portion as an ISO plain datetime string.
*
* - Uses Temporal.ZonedDateTime.from to parse.
* - Rejects leap seconds.
* - Returns "" for invalid input.
*
* @param value zoned ISO 8601 datetime string
* @returns plain local datetime string or "" when invalid
*
* @example parseDateTimeFromZoned("2024-02-29T12:34:56.789+00:00[UTC]") // "2024-02-29T12:34:56.789"
* @example parseDateTimeFromZoned("invalid") // ""
*/
export declare const parseDateTimeFromZoned: (value: string) => string;