@burglekitt/gmt
Version:
Temporal-based date and time utilities with timezone support and polyfill integration
15 lines (14 loc) • 573 B
TypeScript
/**
* Normalize formatted date/time strings for stable comparisons.
*
* - Removes Unicode format and bidi control characters (LRM/RLM/LRE/RLE/etc.)
* - Removes zero-width space and BOM
* - Normalizes various non-breaking and narrow spaces to plain space
* - Collapses repeated whitespace to a single space and trims
* - Normalizes common dash/minus characters to ASCII hyphen-minus
* - Optionally lowercases the result (disabled by default)
*/
export declare function normalizeDateTime(input: string, opts?: {
lower?: boolean;
locale?: string;
}): string;