Skip to content

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