Hi,
Currently, I am working on a process that takes the user’s input (Which would be time and day of a week) and put them in a specific format. I am putting some examples that I want them in (“hh:mm tt”) format with the day of the week.
- mon-fri 10:30am-8:30pm
- monday to friday 10:30 am to 8:30 pm
- m-f 10:30am-8:30pm
- mon: 8-10
tue: 8-10
wed: 8-10
thu: 8-10
fri: 8-10 - mon/wed 1000-2230
- sundays 07:00-14:00
- mon-fri 8-10
closed on weekends - mon,tue,wed,thu,fri: 8:30am-4
- 24x7
- Never Closed
Problem is that the user doesn’t provide in any specific format and if you notice sometimes it happens that one or more data miss(for example, AM or PM or space) ruining the whole format.
I’m aiming for something that takes any of the cases (say “m-f 10:30 am-8:30pm”) and gives the output in a systemic way like,
Monday 10:30 AM 08:30 PM
Tuesday 10:30 AM 08:30 PM
Wednesday 10:30 AM 08:30 PM
Thursday 10:30 AM 08:30 PM
Friday 10:30 AM 08:30 PM