GitHunt
ZE

ZeroOne3010/opening-hours-parser

A Java application to parse opening hours in a string format such as "Mon-Fri 08:00-20:00, Sat-Sun 10:00-18:00".

Opening Hours Parser

A Java 8 library to parse opening hours, given in a string format, into proper Java objects.
Times and days are represented using the
java.time.LocalTime
and java.time.DayOfWeek classes.

For example, the string Mon-Wed 10:00-18:00, Thu-Sun 12:00-20:00 would be parsed into a
WeeklySchedule object from whom one could query the schedule for any day of week:
weeklySchedule.get(DayOfWeek.TUESDAY) would return a DailySchedule object with
opening time 10:00 and closing time 18:00.

Languages

Java100.0%

Contributors

MIT License
Created December 7, 2018
Updated June 22, 2021
ZeroOne3010/opening-hours-parser | GitHunt