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 • 431 B
/** * Return the PlainDate portion extracted from an ISO PlainDateTime string. * * - Extracts date components from a PlainDateTime. * - Returns "" for invalid input. * * @param value ISO PlainDateTime string * @returns ISO PlainDate string or "" on invalid input * * @example chopTime("2024-02-29T12:34:56") // "2024-02-29" * @example chopTime("invalid") // "" */ export declare function chopTime(value: string): string;