UNPKG

@subsocial/utils

Version:
31 lines (30 loc) 800 B
import 'dayjs/locale/ru'; export declare type SubsocialDateLocaleProps = { localeName: string; relativeTime: RelativeTimeProps; }; export declare type RelativeTimeProps = { future: string; past: string; s: string; m: string; mm: string; h: string; hh: string; d: string; dd: string; M: string; MM: string; y: string; yy: string; }; declare class SubsocialDate { constructor(); formatDate(date: string | number): string; updateLocale({ localeName, relativeTime }: SubsocialDateLocaleProps): void; setLocale(localeName: string): void; } export declare const relativeTimeUnits: RelativeTimeProps; export declare const I18N_DAYJS_RELATIVE_TIME_KEY = "dayjs.relativeTime"; export declare const SubDate: SubsocialDate; export {};