Comments (4)
Thank you for your feedback!
It's fixed by the commit 20e1bad, and I just sent the update to PyPi. You can update your version to 1.0.0b3
. ;)
from humanized_opening_hours.
Thanks for your fast answer!
However your fix seems not perfect yet: indeed if you add to your test different months starting from the "next" year it fails:
>>> oh = OHParser("Oct-Mar 07:30-19:30; Apr-Sep 07:00-21:00")
>>> oh.is_open(datetime.datetime(2019, 1, 1, 12, 30)) # 1st Jan: it should be open...
False
>>> oh.is_open(datetime.datetime(2019, 2, 1, 12, 30)) # 1st Feb: it should be open...
False
>>> oh.is_open(datetime.datetime(2019, 3, 1, 12, 30)) # 1st March: it should be open...
False
This is due to the 52 weeks shift of the current year, which makes the "query date" outside of the opening hours limits.
from humanized_opening_hours.
Well, you're right. However, I don't see how to fix this properly (sorry)...
Do you have any suggestion?
from humanized_opening_hours.
Please find my suggestion in PR #27
I think it should fix these tricky cases
from humanized_opening_hours.
Related Issues (20)
- Allow (again) recursion for the `next_change()` method HOT 1
- Allow the separator_for_readability HOT 2
- Need some feedbacks!
- Add translations for other languages HOT 8
- Wrong first day of week HOT 3
- The pt translation requires a different approach on reference to the days of the week HOT 4
- incomplete parsing when weekday is defined twice HOT 4
- Parsing Failure against Non-standard DoW and presence of 'AM' and / or 'PM' HOT 2
- Max recursions error in next_change() function HOT 1
- Allow times which span over midnight HOT 2
- Dynamic Earley (lark) error HOT 2
- Unspecified closing time not supported HOT 1
- Alternate week_description() returning a list HOT 3
- Parsing a description ? (reverse parsing) HOT 3
- unexpected keyword argument 'locale'
- Memoize get_parser HOT 3
- Can't parse comma-separated ranges HOT 1
- Avoid sys.path[0] for finding setup.py directory HOT 4
- get_locale_day() Missing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from humanized_opening_hours.