revert to previous implementation, but make it cleaner
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
const tomorrow = () => {
|
||||
let t = new Date();
|
||||
const t = new Date();
|
||||
t.setDate(t.getDate() + 1);
|
||||
return t.toISOString().split('T')[0];
|
||||
const year = t.getFullYear();
|
||||
const month = String(t.getMonth() + 1).padStart(2, '0');
|
||||
const date = String(t.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${date}`;
|
||||
};
|
||||
|
||||
module.exports = tomorrow;
|
||||
|
||||
Reference in New Issue
Block a user