https://bugzilla.wikimedia.org/show_bug.cgi?id=33579
Web browser: ---
Bug #: 33579
Summary: Strange inconsistent dateformat in #time: function
Product: MediaWiki extensions
Version: any
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: ParserFunctions
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
On Swedish Wikipedia someone by mistake used a Swedish month name in the date
"9 juni 2011" passed to #time: parser function. Even if month names should be
in English, this worked in 2011. But the mistake showed up now in 2012, when
the #time: function thought this was 9 June 2012.
It seems #time accepts time formats "day month year" with an lower case 'i'
added at the end of the month name, both in full and abbreviated month names,
and in Roman numeral months. But for years 2000 to 2059 these dates are somehow
parsed as the current year. For years before 2000 or after 2059 the years are
fine. Here are some examples of results from Wikipedia (both English and
Swedish):
{{#time: Y-m-d|9 juni 1999}} displays as 1999-06-09 (correct year)
{{#time: Y-m-d|9 juni 2000}} displays as 2012-06-09 (wrong year)
{{#time: Y-m-d|9 decemberi 2020}} displays as 2012-12-09 (wrong year)
{{#time: Y-m-d|10 Xi 2030}} displays as 2012-10-10 (wrong year)
{{#time: Y-m-d|10 januaryi 2059}} displays as 2012-01-10 (wrong year)
{{#time: Y-m-d|10 januaryi 2060}} displays as 2060-01-10 (correct year)
Expected results I think is "Error: invalid time".
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l