function dateFormat(date) {
//判断是否是日期
if (!(date instanceof Date))
return Date.parse(date);
//得到年月日 星期几 时分秒
let year = date.getFullYear();
let month = date.getMonth() + 1;
let date1 = date.getDate();
let day = date.getDay
js实现【得到指定格式的日期】
最新推荐文章于 2023-08-07 20:47:36 发布