Commit 016aebfa by 宋祥

1.日期调整为字符串

parent 1b5c1b5b
......@@ -277,7 +277,8 @@ function currShortDate() {
const year = date.getFullYear();
const month = date.getMonth() + 1; // 月份从0开始,需要加1
const day = date.getDate();
return year + (month < 10 ? '0' + month : month.toString()) + (day < 10 ? '0' + day : day);
return year.toString() + (month < 10 ? '0' + month : month.toString())
+ (day < 10 ? '0' + day : day.toString());
}
/**
......@@ -289,7 +290,7 @@ function currShortMonth(getYear) {
const date = new Date(getYear);
const year = date.getFullYear();
const month = date.getMonth() + 1; // 月份从0开始,需要加1
return year + (month < 10 ? '0' + month : month);
return year.toString() + (month < 10 ? '0' + month : month.toString());
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment