In my application I have a mysql table where I have maintained the history of price alteration. I mapped the dates out of the history table and it looks like this:

`['09-16-2019','09-25-2019','10-10-2019',...n]`

Using this history, I want to create an array of date ranges so that I can easily figure out which client in my application registered between what date range. The format I want looks like :

```
let ranges = [ 
        {start:'09-16-2019',end:'09-24-2019'},
        {start:'09-25-2019',end:'10-09-2019'}
        .,
        .,
        ..n
      ]

```