Open mojoaxel opened 3 years ago
can you assign this?
@Kishore-abhimanyu If you want to work on this, just do so and provide a pull-request :+1:
Raised a pull request. Please review and merge it. See #349.
:heavy_check_mark: moment.js has been replaced with day.js in #343 Is replacing _openinghours.js still a topic?
Is replacing opening_hours.js still a topic?
Yes. This still would simplify things but also remove some functionality.
... but also remove some functionality
Ooh. Like what? Do the libraries not provide the same functionality?
simple-opening-hours "only supports the human readable parts". e.g.
Mo-Sa 06:00-22:00
Mo-Fr 08:00-18:00; Sa 10:00-14:00
Mo-Fr 08:00-18:00; Sa,Su 10:00-20:00
Mo-Fr 08:00-12:00, We 14:00-18:00
Mo-Fr 08:00-12:00, 14:00-18:00
Mo-Fr 08:00-18:00; We off
24/7
opening_hours supports a much more compley syntax. I think we don't need this over-engineered syntax and should stick to the "human readable" stuff :-)
Sounds reasonable at first hand. It would be interesting to find out how many of the current data points cannot be handled by days.js. The result would help to support the decision whether a migration make sense.
Related: Yesterday, I reached out to the Berlin Senat to sort out the "sonstige" data points which cannot be parsed by _openinghours.js. Pending response.
Related: Yesterday, I reached out to the Berlin Senat to sort out the "sonstige" data points which cannot be parsed by _openinghours.js. Pending response.
Meanwhile, the number of "sonstige" markets has been reduced for Berlin. Still some to be sorted out.
opening_hours is very complex and has dependencies on moment.js, i18next-client and suncalc. At the moment opening_hours accounts for about 37% of the complete bundle size!
It looks like simple-opening-hours also does, what we want but with a much smaller footprint!