I have a list of working business dates that look like this:
list_of_dates = ["15/02/2021", "16/02/2021", "17/02/2021",
"19/02/2021", "22/02/2021"," 23/02/2021"]
I would like to transform it into a list of continued periods:
list_of_periods = [[start_date="15/02/2021", end_date="17/02/2021"],
[start_date="19/02/2021", end_date="23/02/2021"]
So whenever there's one or more business days between two dates, the prior period ends and a new period starts.
I thought about playing around calculating the differences between dates. What's the best way to go with this?