I've seen Split date range into date range chunks and Split date range into several specific date range chunks, that is not what I'm looking for.
I'm looking for simple function from momenjs, that will help me with known start date, end date and number of chunks (slices) to return an array of equal chunks.
07-15-20 start date 07-27-20 end date I want to split it into 12 chunks
result = [07.15.20 00:00, 07.16.20 00:00, 07.17.20 00:00...]
Trouble starts when date is not so straightforward.
For ex. if I have start date as
minTimeX = moment(sortedTests[0].date).format('x');
maxTimeX = moment(sortedTests.length - 1].date).format('x');
and I want to divide this into equal 12 chunks and I cannot figure how I can calculate it manually. Is it implemented in momentjs?