Repository navigation
Conversation
"5. March 2019" lost its day and "23. October" became 1 October at 23:00, because the little-endian pattern did not allow the dot that often follows the day number. Allow an optional dot after the day and after the end day of a range. Fixes wanasit#283
This branch has not been deployed
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.
Fixes #283
A dot after the day number ("5. March 2019", common in European-style English) was not accepted by
ENMonthNameLittleEndianParser, so the day was dropped or misread:5. March 2019, 03:26 PM EDT"March 2019, 03:26 PM EDT", 1 March 2019 15:26 (day lost)23. October 202623.read as an hour)Sunday 15. Sep"Sunday 15", tomorrow 15:0010. - 22. August 2012"22. August 2012", 1 August 2012 22:00The pattern now allows an optional
.after the day and after the end day of a range, the same wayDEMonthNameLittleEndianParseralready does. Nothing else in the pattern changes.One side effect worth knowing: a numbered list item that starts with a month name, such as
1. May we begin?, now parses as 1 May, the same as1 May we begin?already does without the dot.Tests: a new
Test - Day number followed by a dot (Issue #283)block intest/en/en_month_name_little_endian.test.ts(four cases, spelled out individually). With the parser change reverted it fails (result.indexis 3 instead of 0 for the issue's example).npx jestpasses (754 tests), andprettier --check src testandnpm run buildare clean.npm run eslintwas not run: it already fails on master because there is no eslint 9 flat config (#606).