Lydia_Pintscher added a comment.
In T214002#8691240 <https://phabricator.wikimedia.org/T214002#8691240>, @Lucas_Werkmeister_WMDE wrote: > 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. That option seems not so great to me because according to Wikipedia the most common format does include the day of the week explicitly. > 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 2 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? I am leaning towards we should parse it in this case and assume that the day name is wrong, not the day number. > 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: Lydia_Pintscher Cc: Lydia_Pintscher, 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