Commit b6fa0187 by 宋祥

1.日期改为字符串

parent 7a2deb79
......@@ -279,7 +279,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());
}
/**
......@@ -291,7 +292,7 @@ function currShortMonth() {
const date = new Date();
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