Closed GioBonvi closed 5 years ago
Thank you for your report! However, I'm quite limited by my knowledge of the internal operations of Python... But, as Hacktoberfest started, I'll see if anyone has an idea. :)
I suspect the problem come from here: https://github.com/rezemika/humanized_opening_hours/blob/master/humanized_opening_hours/main.py#L622-L638
I can confirm that @amatissart fix in #24 fixed the problem for me (see outputs for both 'en' and 'it')
>>> import humanized_opening_hours as hoh
>>> print('\n'.join(hoh.OHParser("Mo-Fr 06:00-21:00; Sa,Su 08:00-12:00", locale="en").description()))
From Monday to Friday: 6:00 AM – 9:00 PM.
From Saturday to Sunday: 8:00 AM – 12:00 PM.
>>> print('\n'.join(hoh.OHParser("Mo-Fr 06:00-21:00; Sa,Su 08:00-12:00", locale="it").description()))
Da lunedì a venerdì: 06:00 - 21:00.
Da sabato a domenica: 08:00 - 12:00.
Thank you for the feedback! I close the issue. :)
As stated in #17 when running the basic example found at the beginning of README
I get a completely different result:
I suspect this might be related to some settings, possibily regarding Python internal localization as I live in Italy.
Let me know if I can help you, for example with any details on localization settings of my Python installation (which by the way is Python 3.6.5 on Ubuntu 18.04.1 in WSL running on Windows 10).