update:24-07-06 12:45:16 -AutoCommit
This commit is contained in:
1 parent
c8610911c3
commit
24395358ab
1 file changed
+3
-4
+3
-4
@@ -14,8 +14,8 @@ const execSync = command =>
|
||||
});
|
||||
});
|
||||
|
||||
const input = question => {
|
||||
return new Promise((resolve, rejects) => {
|
||||
const input = question =>
|
||||
new Promise((resolve, rejects) => {
|
||||
try {
|
||||
const readline = _readline.createInterface({
|
||||
input: process.stdin,
|
||||
@@ -29,14 +29,13 @@ const input = question => {
|
||||
rejects(e);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const generateDate = function () {
|
||||
const dateNow = new Date();
|
||||
const paddingNumber = function (num) {
|
||||
return ("0" + num).slice(-2);
|
||||
};
|
||||
let year = dateNow.getFullYear();
|
||||
let year = dateNow.getFullYear().toString().slice(-2);
|
||||
let month = paddingNumber(dateNow.getMonth() + 1);
|
||||
let day = paddingNumber(dateNow.getDate());
|
||||
let hour = paddingNumber(dateNow.getHours());
|
||||
|
||||
Reference in new issue
Block a user