Open Schoonology opened 9 years ago
Interesting. You are absolutely right that this library doesn't cover that use case yet. I am slammed this week, but should be able to add something for this next week. Two things that would help me make this change would be:
I can do just that. Let me think about those two and put a pull request together.
DAY-DAY 4pm-2am, ... TIMEZONE
? The idea would be to continue condensing adjacent time slots across the date boundary.OK, I merged your test cases. Thanks for adding the format. I don't have time this week to look into this, but will make some changes next week.
Just an update that this looks to be a bigger change than I originally thought. I took some shortcuts with the initial implementation in the lexer/parser. In order to do this right, it is going to take a bit of time. I plan on getting back to this later in the month.
Thanks for the status update! That's unfortunate, but understandable.
Disclaimer: Normally I'd lead this toward a pull request, but I'm terrible with parsers.
I came upon your library looking for a way to normalize and display open hours for businesses, but the majority of the businesses I care about operate at night (bars, etc.) - hours like
10pm-2am Fri-Sat
are common. I ran that throughhrsoo
, which produced nothing. I couldn't find a way to split those hours, either, because I couldn't find a way to put midnight as the start time for a block of hours.I'd love to be able to use
hrsoo
, what can we do to solve this problem?