Merge pull request #57 from yehaia1/patch-1

Update index.js
This commit is contained in:
小疯子 2021-03-29 00:31:31 +08:00 committed by GitHub
commit 768dd09e14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
}; };