Skip to content

Commit bb2eea3

Browse files
committed
[fix]{DateTimeNow}: 修复日期多一天的问题
1 parent 0704c09 commit bb2eea3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export function DateTimeNow() {
9494
const date = new Date();
9595
const Y = `${date.getFullYear()}年`;
9696
const M = `${date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1}月`;
97-
const D = `${date.getDate() + 1 < 10 ? `0${date.getDate() + 1}` : date.getDate() + 1}日`;
97+
const D = `${date.getDate() + 1 < 10 ? `0${date.getDate()}` : date.getDate()}日`;
9898
return Y + M + D;
9999
}
100100

0 commit comments

Comments
 (0)