You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
858 B

4 months ago
declare const scale: readonly ["year", "month", "day", "hour", "minute", "second"];
type TimeScale = (typeof scale)[number];
export declare function parseDate(date: Date | string): Date;
/**
*
* @param maxUnit
* @param minUnit
*/
export declare function getMask([maxUnit, minUnit]: [TimeScale, TimeScale]): string;
/**
*
*/
export declare function formatTime(date: Date, mask: string): string;
/**
*
*/
export declare function getTimeDiff(a: Date | string, b: Date | string): number;
/**
*
*/
export declare function getTimeScale(a: Date | string, b: Date | string): TimeScale;
/**
*
*/
export declare function getTimeStart(date: Date, scale: TimeScale): string;
export {};