diff --git a/README.md b/README.md index 55648ff2f..276bdefcc 100644 --- a/README.md +++ b/README.md @@ -4457,6 +4457,7 @@ minDate(array); // 2016-01-08T22:00:00.000Z ### tomorrow Results in a string representation of tomorrow's date. + Use `new Date()` to get today's date, adding one day using `Date.getDate()` and `Date.setDate()`, and converting the Date object to a string. ```js diff --git a/docs/date.html b/docs/date.html index 00a1595b7..50c625678 100644 --- a/docs/date.html +++ b/docs/date.html @@ -149,7 +149,7 @@ new Date(2016, 0, 9) ]; minDate(array); // 2016-01-08T22:00:00.000Z -
Results in a string representation of tomorrow's date. Use new Date() to get today's date, adding one day using Date.getDate() and Date.setDate(), and converting the Date object to a string.
const tomorrow = (long = false) => { +
Results in a string representation of tomorrow's date.
Use new Date() to get today's date, adding one day using Date.getDate() and Date.setDate(), and converting the Date object to a string.
const tomorrow = (long = false) => { let t = new Date(); t.setDate(t.getDate() + 1); const ret = `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, '0')}-${String(