Page MenuHomePhabricator

Wikidata parses dates incorrectly (in Portuguese)
Closed, DuplicatePublic

Description

I'm trying to insert the date 9/11/1876 (9 november 1876) in a item and the system keeps converting this to 11 september 1876. I think it assumes the date is in an unusual format MM/DD/YYYY, while the correct would be DD/MM/YYYY. Typing "9 de novembro de 1876" doesn't work either.

See Also:
T70236: Some localized dates can't be encoded in date property fields.

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:20 AM
bzimport set Reference to bz65722.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 15473
Screenshot on Q16491750

Attached:

Screenshot.png (270×749 px, 21 KB)

When using slashes in a date it is currently considered US-format apparently. We need to support slashes for Portuguese as well and parse it as dd/mm/yy.

Helder: In the meantime can you try using spaces instead of slashes?

Similar problem:

Common czech format DD.MM.YYY or DD. MM. YYY is not recognized. DD-MM-YYY works fine

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
thiemowmde subscribed.

As with many of these time related tickets, the already existing YearMonthDayTimeParser will solve a lot of these cases. It just needs to be used. The remaining cases will be solved by https://gerrit.wikimedia.org/r/153211 and https://github.com/DataValues/Time/pull/83, both still work in progress.

Change 153211 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
[WIP] Add MwDateFormatParser

https://gerrit.wikimedia.org/r/153211

Change 153211 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add DateFormatParser and MwDateFormatParserFactory

https://gerrit.wikimedia.org/r/153211