jiaqingjiayi-xiaochengxu/甲情_甲意/node_modules/antd-mini/es/DatePicker/util.d.ts
2024-11-15 11:51:28 +08:00

35 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Dayjs } from 'dayjs';
declare const precisionLengthRecord: {
year: number;
month: number;
day: number;
hour: number;
minute: number;
second: number;
};
export declare function getRangeData(precision: keyof typeof precisionLengthRecord, min: Dayjs, max: Dayjs, currentPickerDay: Dayjs, format: (precision: keyof typeof precisionLengthRecord, value: number) => string): any[];
/**
* 选中的值转换为时间类型主要处理month从0开始的情况
* @param value
* @returns
*/
export declare function getDateByValue(value: any): Date;
/**
* date转换为value数组
* @param value
* @returns
*/
export declare function getValueByDate(date: any, precision: keyof typeof precisionLengthRecord): any[];
/**
* 是否有效日期,主要处理月份对应可选日期,避免当前时间日期超出当月最后一天
* @param value
*/
export declare function getValidValue(value: any): any;
/**
* 比较两个date是否是同一时间
* @param date1
* @param date2
*/
export declare function isEqualDate(date1: any, date2: any): boolean;
export {};