cron 生成器.

This commit is contained in:
lijiahang
2024-05-21 11:24:27 +08:00
parent 2fed2aaa34
commit 4f0f320fcd
21 changed files with 9239 additions and 9178 deletions

View File

@@ -64,6 +64,9 @@ export const YMD_HMS = 'yyyy-MM-dd HH:mm:ss';
* 格式化时间
*/
export function dateFormat(date = new Date(), pattern = YMD_HMS) {
if (!date) {
return '';
}
const o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),