I have a time range, ex: ["02:15", "04:30"] which shows a session begin and end time.
I need to break that down by the hour. End result would be: 2: 2700 3: 3600 4: 1800
The way I thought about doing this was breaking this down into the following array: ["02:15", "03:00", "04:00", "04:15"] and getting the time difference between the elements.. ie difference between 03:00 and 02:15 which results in 2700s, etc.
Any suggestions on something better? more efficient?