I want to read a txt file containing Strings like this: Friday 12:00-15:00 and mixed many other dates line by line (Ddd hh:mm-hh:mm). And my question is that, what is the most elegant way to calculate between two "lessons" the break?!
For example: 1. lesson start at Friday 12:00 to 15:00 and the second one is 17:00 to 19:00. So the break between the lessons is 2 hours.
I would like to create a time-table and calculate the freetime before the next lesson starts.
What is the best way to do it? Convert String to Date format or separate String to "days and lessons" and substract start from end?