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.

13 lines • 524 B
/** * Extracts the local time portion from an ISO 8601 zoned datetime string. * * - Extracts time components (hour, minute, second, subsecond) from a ZonedDateTime. * - Returns "" for invalid input. * * @param value ISO 8601 zoned datetime string * @returns The local time portion as HH:MM:SS(.SSS) or "" for invalid * * @example chopZonedDate("2024-02-29T14:30:45.123+09:00[Asia/Tokyo]") // "14:30:45.123" * @example chopZonedDate("invalid") // "" */ export declare function chopZonedDate(value: string): string;