export declare function isDate(date: any): boolean; export declare function isMonth(date: any): boolean; export declare function isDatetime(time: any): boolean; export declare function isAnyDate(val: any, type: any): boolean; /** * 验证输入字符串是否符合指定的日期/时间格式 * * 支持的格式占位符: * - yyyy: 4位年份 (如: 2026) * - MM: 2位月份 (01-12) * - dd: 2位日期 (01-31) * - HH: 24小时制小时 (00-23) * - mm: 分钟 (00-59) * - ss: 秒 (00-59) * * @param input - 要验证的输入字符串 * @param format - 期望的格式模板,使用上述占位符 * @returns boolean - 如果输入符合指定格式返回true,否则返回false * * @example * matchFormat('2026-01-28', 'yyyy-MM-dd') // true * matchFormat('2026/01/28', 'yyyy/MM/dd') // true * matchFormat('2026-1-28', 'yyyy-MM-dd') // false (月份和日期不是2位) * matchFormat('2026-01-28 14:30:00', 'yyyy-MM-dd HH:mm:ss') // true */ export declare function matchFormat(input: any, format: any): boolean; /** * 将Date对象格式化为指定格式的字符串 * * 支持的格式占位符: * - y+ : 年份,y的数量决定显示的位数(如:yyyy=2026, yy=26) * - M+ : 月份(1-12) * - d+ : 日期(1-31) * - h+ : 小时(0-23) * - m+ : 分钟(0-59) * - s+ : 秒(0-59) * - q+ : 季度(1-4) * - S : 毫秒 * * 注意:对于M、d、h、m、s,如果格式中指定了多位(如MM、dd),则会自动补零 * * @param date - 要格式化的Date对象 * @param fmt - 格式模板字符串 * @returns string - 格式化后的日期字符串 * * @example * const date = new Date(2026, 0, 28, 14, 30, 45, 123) * format(date, 'yyyy-MM-dd') // "2026-01-28" * format(date, 'yyyy年MM月dd日 hh:mm:ss') // "2026年01月28日 14:30:45" * format(date, 'yy/M/d') // "26/1/28" * format(date, 'yyyy-MM-dd HH:mm:ss.S') // "2026-01-28 14:30:45.123" */ export declare function format(date: Date, fmt: string): string;