Last modified: 2014-04-30 15:09:01 UTC
== REPRODUCTION == * Go to https://www.wikidata.org/wiki/Special:Export/q937 and get the value for p570 * Go to https://www.wikidata.org/wiki/Special:Export/q44269 and get the value for p570 * For convenience's sake, the two values are listed below: q937 +00000001955-04-18T00:00:00Z q44269 +000000000343-12-06T00:00:00Z * Note that the date with year 343 has an extra leading 0 == RELEVANCE == * See https://bugzilla.wikimedia.org/show_bug.cgi?id=30148#c11 for an example of how this causes a bug elsewhere * Basically, Module code is calling string.sub(d, 9, 18), and is not expecting the year 343 date to have an extra 0 : It ends up extracting a date of "00343-12-0" and triggers the year 10,000 bug. * As a result, Nicolau de Mira shows up as having died in 2003 instead of 343. == OTHER NOTES == * This does not appear related to https://bugzilla.wikimedia.org/show_bug.cgi?id=26181 which is for the semantic wiki
The years are currently always padded by the TimeValue when being stored. As time has passed the level of padding has changed. Can you not just trim the 0s from the left of the string extracted?
This is a sensible suggestion, but the script was not written by me. I only happened to come across this issue on Catalan Wikipedia while investigating the Year 10,000 bug. See: https://bugzilla.wikimedia.org/show_bug.cgi?id=30148#c11 I would leave a note on the talk page, but it is a non-English wiki, and I generally don't know what the policy is for feedback in other languages (do I translate the note using an online translator?) In addition, there would probably be multiple wikis that need to be changed. In addition to Catalan, there are four other wikis that use similar logic for their main Wikidata Module. See the list below. Hope this helps. === affected: uses "9" as substring for date === - https://ca.wikipedia.org/wiki/Module:Wikidata - https://en.wikipedia.org/wiki/Module:Wikidata - https://fr.wikipedia.org/wiki/Module:Wikidata/Dates - https://es.wikipedia.org/wiki/Module:Wikidata - https://uk.wikipedia.org/wiki/Module:Datetime/Wikidata === unaffected: uses a regex === - https://de.wikipedia.org/wiki/Module:Wikidata - https://it.wikipedia.org/wiki/Module:Wikidata - https://sv.wikipedia.org/wiki/Module:Time === currently unaffected: no code handling time data-type === - https://ru.wikipedia.org/wiki/Module:Wikidata - https://hu.wikipedia.org/wiki/Module:Wikidata - https://no.wikipedia.org/wiki/Module:Wikidata === currently unaffected: Module:Wikidata doesn't exists === - https://nl.wikipedia.org/wiki/Module:Wikidata - https://pl.wikipedia.org/wiki/Module:Wikidata - https://ar.wikipedia.org/wiki/Module:Wikidata - https://ja.wikipedia.org/wiki/Module:Wikidata - https://zh.wikipedia.org/wiki/Module:Wikidata - https://pt.wikipedia.org/wiki/Module:Wikidata - https://vi.wikipedia.org/wiki/Module:Wikidata