mirror of
https://github.com/zwpro/coupons.git
synced 2025-12-10 16:52:48 +00:00
Update index.js
获取时间拼接字符串的常量-->变量
This commit is contained in:
parent
ddfc3e1c05
commit
59d8ce6b4e
@ -5,8 +5,8 @@ function getFormatDate(ms) {
|
|||||||
let date = new Date();
|
let date = new Date();
|
||||||
date.setTime(date.getTime() + ms);
|
date.setTime(date.getTime() + ms);
|
||||||
const year = date.getFullYear();
|
const year = date.getFullYear();
|
||||||
const month = date.getMonth() + 1;
|
let month = date.getMonth() + 1;
|
||||||
const strDate = date.getDate();
|
let strDate = date.getDate();
|
||||||
if (month >= 1 && month <= 9) {
|
if (month >= 1 && month <= 9) {
|
||||||
month = '0' + month;
|
month = '0' + month;
|
||||||
}
|
}
|
||||||
@ -96,4 +96,4 @@ exports.main = async (event, context) => {
|
|||||||
});
|
});
|
||||||
return Promise.all(sendPromises)
|
return Promise.all(sendPromises)
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user