This is a really simple question, yet somehow it's got me thinking. I have opening hours formatted in this way: [MO,TU:0800-1230,1300-1700;WE:0800-1230;TH:0800-1230,1400-1700;FR:0800-1230,1300-1500;SA,SU:0800-1500]
. The string can have one time entry per day, but it doesn't have to, as you can see.
I need to extract each day and save it to the corresponding day field field (which is just a String like HH:mm-HH:mm
) of an OpeningHrs
class. What would be the best way to go at this? I'm not looking for code, just a suggestion on what the cleanest way would be to achieve my goal, bcause all solutions going through my head seem needlessly complicated.