@burglekitt/gmt
Version:
Temporal-based date and time utilities with timezone support and polyfill integration
14 lines (13 loc) • 515 B
TypeScript
/**
* Returns the zoned datetime string truncated to minute precision.
*
* - Removes seconds and milliseconds.
* - Returns "" for invalid input.
*
* @param value ISO 8601 zoned datetime string
* @returns Zoned datetime string at minute precision or "" for invalid
*
* @example chopZonedSeconds("2024-02-29T14:30:45.123-05:00[America/New_York]") // "2024-02-29T14:30-05:00[America/New_York]"
* @example chopZonedSeconds("invalid") // ""
*/
export declare function chopZonedSeconds(value: string): string;