/** * Format a date */ export declare function formatDate(date: Date | number | string, style?: DateStyle | DateFormatOptions, locale?: string): string; /** * Format a time */ export declare function formatTime(date: Date | number | string, style?: TimeStyle | DateFormatOptions, locale?: string): string; /** * Format a date and time */ export declare function formatDateTime(date: Date | number | string, dateStyle?: DateStyle, timeStyle?: TimeStyle, locale?: string): string; /** * Format relative time (e.g., "2 days ago", "in 3 hours") */ export declare function formatRelativeTime(date: Date | number | string, baseDate?: Date | number | string, style?: 'long' | 'short' | 'narrow', locale?: string): string; /** * Format a number */ export declare function formatNumber(value: number, options?: NumberFormatOptions, locale?: string): string; /** * Format a currency value */ export declare function formatCurrency(value: number, currency?: string, options?: Omit, locale?: string): string; /** * Format a percentage */ export declare function formatPercent(value: number, options?: Omit, locale?: string): string; /** * Format a number with units (e.g., "5 kilograms", "10 miles") */ export declare function formatUnit(value: number, unit: string, unitDisplay?: 'long' | 'short' | 'narrow', locale?: string): string; /** * Format bytes to human-readable format */ export declare function formatBytes(bytes: number, decimals?: number, locale?: string): string; /** * Format a list of items */ export declare function formatList(items: string[], type?: ListType, style?: ListStyle, locale?: string): string; /** * Get the plural category for a number */ export declare function formatPlural(value: number, locale?: string): Intl.LDMLPluralRule; /** * Select from plural options based on a number */ export declare function selectPlural(value: number, options: Partial> & { other: T }, locale?: string): T; /** * Get display name for a code */ export declare function getDisplayName(code: string, type?: DisplayNameType, style?: 'long' | 'short' | 'narrow', locale?: string): string | undefined; /** * Get language name */ export declare function getLanguageName(languageCode: string, locale?: string): string | undefined; /** * Get region/country name */ export declare function getRegionName(regionCode: string, locale?: string): string | undefined; /** * Get currency name */ export declare function getCurrencyName(currencyCode: string, locale?: string): string | undefined; /** * Compare strings in a locale-aware manner */ export declare function compareStrings(a: string, b: string, options?: Intl.CollatorOptions, locale?: string): number; /** * Sort an array of strings in locale-aware order */ export declare function sortStrings(strings: string[], options?: Intl.CollatorOptions, locale?: string): string[]; /** * Get the text direction for a locale */ export declare function getTextDirection(locale?: string): 'ltr' | 'rtl'; /** * Check if a locale uses RTL text direction */ export declare function isRTL(locale?: string): boolean; export declare interface DateFormatOptions extends Intl.DateTimeFormatOptions { dateStyle?: DateStyle timeStyle?: TimeStyle } // ============================================================================= // Number Formatting // ============================================================================= export declare interface NumberFormatOptions extends Intl.NumberFormatOptions { compact?: boolean precision?: number } // ============================================================================= // Date Formatting // ============================================================================= export type DateStyle = 'full' | 'long' | 'medium' | 'short'; export type TimeStyle = 'full' | 'long' | 'medium' | 'short'; // ============================================================================= // List Formatting // ============================================================================= export type ListType = 'conjunction' | 'disjunction' | 'unit'; export type ListStyle = 'long' | 'short' | 'narrow'; // ============================================================================= // Display Names // ============================================================================= export type DisplayNameType = 'language' | 'region' | 'script' | 'currency' | 'calendar' | 'dateTimeField';