vh-plugin
Version:
轻量级JS插件包
9 lines (8 loc) • 503 B
TypeScript
/**
* @description: 将时间戳格式化为指定格式的时间字符串
* @param {number} time - 时间戳,必填项。支持10位和13位时间戳。
* @param {string} format - 时间格式字符串,不必填项。默认格式为YYYY-MM-DD hh:mm:ss。传入格式时,YYYY、MM、DD、hh、mm、ss不可改变,其他可改变。
* @returns {string} 指定格式的时间字符串。
*/
declare const TimeFormat: (time: number | string, format?: string) => string;
export { TimeFormat };