UNPKG

@singleton-i18n/angular-client

Version:

Singleton client code for Angular 10.

50 lines (49 loc) 1.36 kB
export declare class DateFormatter { private localeData; constructor(); /** * Convert number or string to standard time * @param date * @return instance of Date or origin string */ getStandardTime(date: any): any; /** * Get locale date time from standard date string * @return Formatted locale date time string */ getformattedString(date: Date, pattern: string, localeData: any, minusSign?: string, timezone?: string): string; getRulesByPattern(pattern: string, localeData: any): string; /** * Get rules from pattern by type * @return The function to get locale string */ private getRules; private getRulesInPattern; /** * The date-time pattern shows how to combine separate patterns for date (represented by {1}) * and time (represented by {0}) into a single pattern. */ private formatDateTimeRules; /** * Get locale date string from pattern */ private dateStrGetter; private getLocaleString; /** * Get periods of the day */ private getDaysPeriods; /** * Get eras */ private getEras; /** * Convert pattern string to pattern array */ private patternFilter; private concat; /** * Corresponding function of the rule */ private getFormatFunctionByRule; }