-
Notifications
You must be signed in to change notification settings - Fork 197
Open
Description
I'm trying to use this add-on in order to get an array of dates from 2020-01-01 to 2020-12-31.
const startDate = moment.utc('2020-01-01').toDate()
const endDate = moment.utc('2020-12-31').toDate()
const rangeBetweenStartAndEnd = Array.from(moment.range(startDate, endDate).by('day'))
return rangeBetweenStartAndEnd.map((day) => {
...
})
However, my resulting JSON object has duplicate days, one of which is 2020-03-08 which is Daylight Savings Time. I have a lot of resulting data but I assume if this is a time savings issue, then there would be another duplicate on November 1?
I feel like maybe I'm doing something wrong because surely this issue would have been caught earlier? Maybe it has something to do with me converting my moment dates back to JS dates?
Any help would be appreciated
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels