I'm trying to figure out a nice way of getting a date-streak from a list of objects which will have activities on them. The premise to the problem is, each user records their 'excercise' which can be multiples per day. I don't care about anything other than some acceptence criteria (namely, duration of the exercise) but I can group these effectively into some structure I assume of:
[date] : [true/false]
[date] : [true/false]
This would indicate if the user has completed an activity on that date.
Where I'm struggling is to then calculate the streak of dates (the largest streak) in that full list, ie: