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

[WIP] Unlocalize months in YearMonthDayTimeParser #93

Closed
wants to merge 1 commit into from

Conversation

thiemowmde
Copy link
Contributor

This is an unfinished work in progress. I'm not sure if this is the right thing to do. Problem is: this messes with the original idea of this super-simple parser to extract three numbers from the input and simply ignore all non-digits. This is critical for inputs like "31 de 12 de 2015" but also means odd stuff like "31 February 12 2015" is parsed successfully. This patch would change that.

What I want to do:

  • Explore if my proposed MwDateFormatParser (see https://gerrit.wikimedia.org/r/153211 and [WIP] Add DateFormatParser #83) can parse "February 29, 1700".
  • Add way, way more test cases to this patch to make sure it always acts as expected. This needs time, probably more than a single sprint.
  • If this patch is going to be merged, do the same in YearMonthTimeParser, make it independent from MediaWiki and move it to this component.

Bug: T98194

wmfgerrit pushed a commit to wikimedia/mediawiki-extensions-Wikibase that referenced this pull request Sep 29, 2015
This is pure refactoring. The goal is to make this parser independent
from MediaWiki core. Note that this is only a first step. Please review
and merge this as it is. More will be done in later patches.

This patch is motivated by wmde/Time#93
where I do the same to the YearMonthDayTimeParser. Both should use the
same array( localized month names => numbers ) in the end. This array
will be constructed in the TimeParserFactory (that's the reason for the
@see).

Change-Id: I2e35005a557180ff955678cfc0ed0e3d8a3e13b8
@addshore
Copy link
Contributor

Closing very old PRs

@addshore addshore closed this Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants