I have one date rang json and I need to generate missing dates and store into array but how can I do have no idea.
Here below json:
0:{ AvailabilityStatus : 1
DateFrom : "2018-08-04 00:00"
DateTo : "2018-08-11 00:00" }
1:{ Status : 1
DateFrom : "2018-08-11 00:00"
DateTo : "2018-08-18 00:00" }
2:{ Status : 1
DateFrom : "2018-09-01 00:00"
DateTo : "2018-09-08 00:00" }
3:{ Status : 1
DateFrom : "2018-09-08 00:00"
DateTo : "2018-09-15 00:00" }
So above from the json missing date range is 2018-08-19 to 2018-08-31. so I need to generate missing dates like this 2018-08-19,2018-08-20,...,2018-08-31 and store into an array.