时间格式化函数(判断今天昨天、时间精度)
Date.prototype.format = function(fmt) {
var o = {
"M+": this.getMonth() + 1, //月份
"d+": this.getDate(), //日
"h+": this.getHours(), //小时
"m+": this.getMinutes(), //分
"s+": this.getSeconds(), //秒
"q+": Math.floor((this.getMonth() +
原创
2021-08-07 23:55:03 ·
129 阅读 ·
0 评论