Lucas_Werkmeister_WMDE added a comment.

  So the first of the above changes, Make DateFormatParser accept more 
Asian/Chinese date formats 
<https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/886919>, 
enables Wikibase to parse dates like “2023年3月12日” in Japanese as 2023-03-12. 
That change seems unproblematic and is good to go, I think.
  
  However, the second one, Let DateFormatParser accept and skip redundant day 
of the week 
<https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/886920>, is a 
bit trickier. With that change, //all// of the following would parse as 
2023-03-12 in Japanese:
  
  1. 2023年3月12日 – as before
  2. 2023年3月12日 (日) – correct weekday (Sunday)
  3. 2023年3月12日 (一) – blank weekday
  4. 2023年3月12日 (whatever) – nonsense weekday
  5. 2023年3月12日 (月) – **different** weekday  (Monday)
  
  Thiemo mentioned some possible alternatives in the commit message:
  
  1. Stick with what the previous patch did and accept only inputs without a 
day of the week.
    - This would accept 1 and reject 2-5.
  2. Add an option to the parser similar to the existing "monthNames" option 
and require callers to list all possible names. Only these will be accepted.
    - This would accept 1, 2 and 5, and reject 3 and 4.
  3. Make an entirely separate parser for Chinese dates.
    - Something like this is required, I think, if we want to accept 4 and 
reject 5. Though I think it should be possible to handle this in a way that’s 
not specific to Chinese, but works in any language that contains named days of 
the week in the date format.
  
  I think this is a product question (and, IIRC, not one we explicitly 
discussed in yesterday’s bug triage hour): when users input a date with a named 
day of the week, and the day of the week doesn’t match the date (as in 
“2023年3月12日 (月)”), should the date successfully parse (ignoring the named day 
of the week) or not?
  
  IMHO, it’s at least conceivable that users would specify the day of the week 
as an intentional redundancy, and expect the software to check that they didn’t 
make a mistake in either the numeric date or the day of the week. On the other 
hand, I don’t think it’s realistic for us to return a specific error like “this 
date doesn’t match the specified day of the week”; the result would just be a 
parse error, or worse, Wikibase might even fall back to another parser and 
still successfully parse the date: just like it’s already able to parse 
“2001年8月31日”, for instance.

TASK DETAIL
  https://phabricator.wikimedia.org/T214002

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, Nikki, thiemowmde, Nicolas_Raoul, Aklapper, 
Themindcoder, Adamm71, Jersione, Hellket777, LisafBia6531, Astuthiodit_1, 786, 
Biggs657, karapayneWMDE, Invadibot, maantietaja, Juan90264, Alter-paule, 
Beast1978, ItamarWMDE, Un1tY, Akuckartz, Hook696, Kent7301, joker88john, 
CucyNoiD, Nandana, Gaboe420, Giuliamocci, Cpaulf30, Lahi, Gq86, Af420, 
Bsandipan, GoranSMilovanovic, QZanden, LawExplorer, Lewizho99, Maathavan, 
_jensen, rosalieper, Neuronton, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to