date-time-plugin-minify
Version:
A date time pulgin modify date and time in easy formats
25 lines (24 loc) • 1.43 kB
TypeScript
export declare class DateFormatter {
private date;
private format;
private formatted?;
constructor(date: Date | string, format: dateFormat, currentFormat?: dateFormat);
formatDate(): this;
TZ(timeZone: timeZones, locale?: locale): string;
getFormatted(): string;
}
export declare function GetFormattedDate(date: Date | string, format?: dateFormat): void;
export declare function getDiffBetweenDates(firstDate: Date | string, secondDate: Date | string, options?: {
format: dateFormat;
}): {
seconds: number;
minutes: number;
hours: number;
days: number;
months: number;
years: number;
};
type dateFormat = 'YYYY-MM-DD' | 'DD/MM/YYYY' | 'MM/DD/YYYY' | 'MM-DD-YYYY' | 'DD MMM, YYYY' | 'YYYY/MM/DD' | 'YYYY/MM/DD HH:mm:ss' | 'HH:mm:ss';
type locale = 'en-US' | 'en-GB' | 'fr-FR' | 'de-DE' | 'es-ES' | 'ja-JP' | 'zh-CN' | 'zh-TW' | 'hi-IN' | 'ar-SA' | 'ru-RU' | 'pt-BR' | 'th-TH' | 'vi-VN' | 'sv-SE' | 'pl-PL' | 'ko-KR' | 'pt-BR' | 'ru-RU' | 'ar-SA' | 'it-IT' | 'nl-NL' | 'tr-TR';
type timeZones = 'Asia/Tokyo' | 'Asia/Kolkata' | 'America/New_York' | 'America/Chicago' | 'Europe/London' | 'Asia/Dubai' | 'Asia/Singapore' | 'Asia/Bangkok' | 'America/Los_Angeles' | 'America/Denver' | 'Europe/Paris' | 'Europe/Berlin' | 'Australia/Sydney' | 'Africa/Johannesburg' | 'America/Toronto' | 'America/Sao_Paulo' | 'Europe/Moscow' | 'Pacific/Auckland' | 'UTC' | 'Asia/Shanghai';
export {};