Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canonical form: Jumbled order of nth weekdays #79

Closed
westnordost opened this issue Jan 7, 2024 · 1 comment
Closed

Canonical form: Jumbled order of nth weekdays #79

westnordost opened this issue Jan 7, 2024 · 1 comment

Comments

@westnordost
Copy link
Contributor

This parser outputs a canonical form of the parsed opening hours string for better readability. However, there seems to be a bug for nth weekdays.

E.g. "all Sundays except the 2nd Sunday of each month": Su[1,3,4,5] is changed to Su[1,5,4,3].

This does not increase readability, actually, why change the order at all?

@simonpoole
Copy link
Owner

simonpoole commented Jan 8, 2024

Without actually checking, I'm fairly sure that is an artifact of how the numbers are collected during parsing and it is just missing a Collections.reverse at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants