优化
This commit is contained in:
parent
a40e32361a
commit
d98e394fc2
@ -38,7 +38,7 @@ function formatDate(date: Date, fmt = 'yyyy-MM-dd') {
|
||||
.replace(/s/g, date.getSeconds().toString())
|
||||
.replace(/SSS/g, pad3(date.getMilliseconds()))
|
||||
.replace(/S/g, date.getMilliseconds().toString())
|
||||
.replace(/a/g, date.getHours() < 12 ? '上午' : '下午')
|
||||
.replace(/a/g, date.getHours() < 12 ? '上午' : '下午')
|
||||
.replace(/A/g, date.getHours() < 12 ? 'AM' : 'PM')
|
||||
.replace(/q/g, Math.floor((date.getMonth() + 3) / 3).toString());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user