@farris/devkit-vue
Version:
27 lines (26 loc) • 655 B
TypeScript
/**
* 日期工具类
*/
declare class DateUtil {
static defaultISOFormat: string;
static defaultDisplayFormat: string;
static defaultDateFormat: string;
static defaultTimeFormat: string;
/**
* 是否为日期对象
*/
static isDate(date: any): boolean;
/**
* 是否为空日期
*/
static isEmptyDate(date: any): boolean;
/**
* 解析日期字符串
*/
static parse(date: string | Date): Date | null;
/**
* 将日期(或日期字符串)转换为指定格式的字符串
*/
static format(date: string | Date, dateFormat?: string): string;
}
export { DateUtil };