✨ cron 生成器.
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user