Javascript日期格式化
// 日期格式化函数,用法:new Date().Format("yyyy-MM-dd hh:mm:ss.fff")
Date.prototype.Format = function (exp) {
var t = {
"y+": `${this.getFullYear()}`, // 年
"M+": `${this.getMonth() + 1}`, // 月
"d+": `${this.getDate()}`, // 日
"h+": `${this.getHours()}`, // .
原创
2020-08-27 22:01:50 ·
168 阅读 ·
0 评论