Repository navigation
Replies: 1 comment
|
Use import { DateTime } from 'luxon';
const start = DateTime.fromISO('2022-07-20');
const end = DateTime.fromISO('2022-07-25');
const dates = [];
for (let date = start; date <= end; date = date.plus({ days: 1 })) {
dates.push(date.toISODate());
}
// ['2022-07-20', '2022-07-21', '2022-07-22',
// '2022-07-23', '2022-07-24', '2022-07-25']Luxon dates are immutable, so assigning the result of I checked the array above with Luxon 3.0.4 and 3.7.2. The API docs cover |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
how to do get this result?
[
"2022-07-20",
"2022-07-21",
"2022-07-22",
"2022-07-23",
"2022-07-24",
"2022-07-25"
...
]
All reactions