Repository navigation
fix(weekday): accept a period after abbreviated weekday names - #334
Conversation
|
@cakebaker I think this PR may improve GNU test parity. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #334 +/- ##
==========================================
+ Coverage 97.70% 97.71% +0.01%
==========================================
Files 21 21
Lines 4395 4418 +23
Branches 138 138
==========================================
+ Hits 4294 4317 +23
Misses 100 100
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:
|
|
|
||
| fn day(input: &mut &str) -> ModalResult<Day> { | ||
| s(alpha1) | ||
| s((alpha1, opt('.')).take()) |
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
There was a problem hiding this comment.
Added a new commit
|
Are there any concerns blocking the merge of this PR? |
f068cd8 to
6943f5d
Compare
|
branch is rebased, with issues addressed @sylvestre |
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.