NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/xe-utils/methods/date/toDateString.d.ts
2023-09-14 14:47:11 +08:00

37 lines
996 B
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 { XEUtilsMethods } from '../xe-utils'
export interface ToDateStringOptions {
/**
* 自定义格式化模板
* {
* formats: {
* q: ['日', '一', '二', '三', '四', '五', '六'],
* E: function (value, match, date) { return '三' }
* }
* }
*/
formats?: any
}
/**
* 日期格式化为任意格式字符串,转义符号 []
* @param date 字符串/日期/时间戳
* @param format 格式化 默认yyyy-MM-dd HH:mm:ss.SSS
* @param options 可选参数
*/
export declare function toDateString(date: string | Date | number, format?: string, options?: ToDateStringOptions): string;
declare module '../xe-utils' {
interface XEUtilsMethods {
/**
* 日期格式化为任意格式字符串,转义符号 []
* @param date 字符串/日期/时间戳
* @param format 格式化 默认yyyy-MM-dd HH:mm:ss.SSS
* @param options 可选参数
*/
toDateString: typeof toDateString;
}
}
export default toDateString