Update tomorrow.md
This commit is contained in:
@ -7,13 +7,7 @@ Use `new Date()` to get today's date, adding one day using `Date.getDate()` and
|
|||||||
const tomorrow = () => {
|
const tomorrow = () => {
|
||||||
let t = new Date();
|
let t = new Date();
|
||||||
t.setDate(t.getDate() + 1);
|
t.setDate(t.getDate() + 1);
|
||||||
return (
|
return `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, '0')}-${String(t.getDate()).padStart(2, '0')}`;
|
||||||
t.getFullYear() +
|
|
||||||
'-' +
|
|
||||||
String(t.getMonth() + 1).padStart(2, '0') +
|
|
||||||
'-' +
|
|
||||||
String(t.getDate()).padStart(2, '0')
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user