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

Day Repeater start fix #429

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jamesmacwilliam
Copy link

Problem

Chronic.parse("Sunday January 19, 2025 at 5pm") and variations for the suffix such as in yyyy-mm-dd format, etc, fail to parse, but excluding either the year or the repeater-day resolve the issue.

Fix

  • detect the presense of repeater day + ordinal/scalar day + ordinal/scalar year, if present and tokens_to_span returns nil, re-run and remove the repeater-day token

 ## Problem
`Chronic.parse("Sunday January 19, 2025 at 5pm")` and variations for the
suffix such as in yyyy-mm-dd format, etc, fail to parse, but excluding
either the year or the repeater-day resolve the issue.

 ## Fix
 - detect the presense of repeater day + ordinal/scalar day +
   ordinal/scalar year, if present and tokens_to_span returns nil,
   re-run and remove the repeater-day token
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

Successfully merging this pull request may close these issues.

1 participant