fix(weekday): accept a period after abbreviated weekday names - #334
Open
anasbekheit wants to merge 2 commits into
Open
anasbekheit wants to merge 2 commits into
anasbekheit wants to merge 2 commits into
Conversation
Author
|
@cakebaker I think this PR may improve GNU test parity. |
anasbekheit
marked this pull request as ready for review
September 26, 2026 04:45
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #334 +/- ##
==========================================
+ Coverage 97.48% 97.49% +0.01%
==========================================
Files 21 21
Lines 4258 4279 +21
Branches 136 136
==========================================
+ Hits 4151 4172 +21
Misses 106 106
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sylvestre
reviewed
Sep 26, 2026
|
|
||
| fn day(input: &mut &str) -> ModalResult<Day> { | ||
| s(alpha1) | ||
| s((alpha1, opt('.')).take()) |
Contributor
There was a problem hiding this comment.
please add a test with the full parser, like parse_datetime("wed., 2024-01-03")
the existing "mon." unit tests already passed before, they don't check that the whole input was consumed
Author
|
Are there any concerns blocking the merge of this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The weekday parser matched with
alpha1, which never consumes., so the existing"mon.","tue.", … arms could never match and inputs likemon.orwed., 2024-01-03were rejected. GNUdateaccepts a period after the three-letter abbreviation. The parser now includes an optional trailing period in the word.