Lucas_Werkmeister_WMDE added a comment.
It turns out the pull request introduces some changes that may not be wanted. Currently (since Partial support for thousands separators in DateTimeParsers <https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/119973>), we allow thousands separators in BC dates, under the assumption that “negative dates usually don’t have a month”. So you currently get the following parses (API request <https://www.wikidata.org/w/api.php?action=wbparsevalue&format=json&datatype=time&values=1%20BC%7C10%20BC%7C100%20BC%7C1%20000%20BC%7C10%20000%20BC%7C100%20000%20BC%7C1%20000%20000%20BC%7C10%20000%20000%20BC>): - 1 BC: -0001-00-00T00:00:00Z, precision 9 - 10 BC: -0010-00-00T00:00:00Z, precision 9 - 100 BC: -0100-00-00T00:00:00Z, precision 9 - 1 000 BC: -1000-00-00T00:00:00Z, precision 9 - 10 000 BC: -10000-00-00T00:00:00Z, precision 5 - 100 000 BC: -100000-00-00T00:00:00Z, precision 4 - 1 000 000 BC: -1000000-00-00T00:00:00Z, precision 3 - 10 000 000 BC: -10000000-00-00T00:00:00Z, precision 2 (The precision jumps because we “default to year precision for range 4000 BC to 4000” in `IsoTimestampParser::getPrecisionFromYear()`.) With the change to the `YearMonthTimeParser`, you instead get: - 1 BC: -0001-00-00T00:00:00Z, precision 9 - 10 BC: -0010-00-00T00:00:00Z, precision 9 - 100 BC: -0100-00-00T00:00:00Z, precision 9 - 1 000 BC: -0000-**01-00**T00:00:00Z, precision **10** - 10 000 BC: -0000-**10-00**T00:00:00Z, precision **10** - 100 000 BC: -100000-00-00T00:00:00Z, precision 4 - 1 000 000 BC: -1000000-00-00T00:00:00Z, precision 3 - 10 000 000 BC: -10000000-00-00T00:00:00Z, precision 2 Put differently: do we want to parse “1 234 BC” as 1234 BC, or as January 234 BC? TASK DETAIL https://phabricator.wikimedia.org/T233105 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Mbch331, Addshore, Ladsgroup, Lucas_Werkmeister_WMDE, Aklapper, matej_suchanek, Biggs657, Invadibot, Lalamarie69, maantietaja, Alter-paule, Beast1978, Un1tY, Akuckartz, Hook696, Iflorez, Kent7301, alaa_wmde, joker88john, CucyNoiD, Nandana, Gaboe420, Giuliamocci, Cpaulf30, Lahi, Gq86, Af420, Bsandipan, GoranSMilovanovic, QZanden, LawExplorer, Lewizho99, Maathavan, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Lydia_Pintscher
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
