Get dates between two moment objects
enumerateDaysBetweenDates = (startDate, endDate) => { | |
const now = startDate.clone().startOf("day"); | |
const dates = []; | |
while (now.isSameOrBefore(endDate.startOf("day"))) { | |
dates.push(now.format("YYYY-MM-DD")); | |
now.add(1, "days"); | |
} | |
return dates; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment