UNPKG

@northguild/gmt

Version:

Date and time library for JavaScript and TypeScript, built on TC39 Temporal: time zones, DST, business days, ISO 8601 strings in and out. Never throws.

14 lines • 561 B
/** * 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;