Valens-AIO/types/utils/TimeUtil.d.ts

32 lines
843 B
TypeScript
Raw Normal View History

2022-08-29 17:07:55 -04:00
/**
* Utility class to handle time related problems
*/
2022-07-30 00:35:54 -04:00
export declare class TimeUtil {
static readonly oneHourAsSeconds = 3600;
formatTime(date: Date): string;
formatDate(date: Date): string;
getDate(): string;
getTime(): string;
/**
* Get timestamp in seconds
* @returns
*/
2022-07-30 00:35:54 -04:00
getTimestamp(): number;
2022-08-08 20:03:48 -04:00
/**
* mail in eft requires time be in a specific format
* @returns current time in format: 00:00 (hh:mm)
*/
getTimeMailFormat(): string;
/**
* Mail in eft requires date be in a specific format
* @returns current date in format: 00.00.0000 (dd.mm.yyyy)
*/
getDateMailFormat(): string;
2022-08-28 23:48:57 -04:00
/**
* Convert hours into seconds
* @param hours hours to convert to seconds
* @returns number
*/
getHoursAsSeconds(hours: number): number;
2022-07-30 00:35:54 -04:00
}