import '../string/replaceAll.js'; /** * * 只想简单地格式化时间和日期,不想引入dayjs * * * 格式化参数与dayjs一致 * 根据模板格式化日期时间 * YY 18 年,两位数 YYYY 2018 年,四位数 M 1-12 月,从1开始 MM 01-12 月,两位数字 MMM Jan-Dec 月,英文缩写 D 1-31 日 DD 01-31 日,两位数 H 0-23 24小时 HH 00-23 24小时,两位数 h 1-12 12小时 hh 01-12 12小时,两位数 m 0-59 分钟 mm 00-59 分钟,两位数 s 0-59 秒 ss 00-59 秒,两位数 S 0-9 毫秒(百),一位数 SS 00-99 毫秒(十),两位数 SSS 000-999 毫秒,三位数 Z -05:00 UTC偏移 ZZ -0500 UTC偏移,两位数 A AM / PM 上/下午,大写 a am / pm 上/下午,小写 Do 1st... 31st 月份的日期与序号 t 小写时间段,如am,pm T 大写时间段段,如上午、中午、下午 */ interface FormatDateTimeOptions { language?: 'cn' | 'en'; } declare function formatDateTime(value?: Date | number, format?: string, options?: FormatDateTimeOptions): string; export { type FormatDateTimeOptions, formatDateTime };