Last modified: 2014-04-30 13:18:54 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52477, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50477 - {{#time:M|february}} returns mar
{{#time:M|february}} returns mar
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
ParserFunctions (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
https://test.wikipedia.org/wiki/Bug_5...
:
: 59137 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-30 19:53 UTC by snaevar
Modified: 2014-04-30 13:18 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description snaevar 2013-06-30 19:53:58 UTC
{{#time:M|February}} returns Mar, but not Feb as would be expected. The same thing goes with the Lua eqvaluent mw.getContentLanguage():formatDate( "M", "February" ) .
Comment 1 MZMcBride 2013-06-30 20:01:41 UTC
Weird.

https://test.wikipedia.org/wiki/Bug_50477
Comment 2 Gerrit Notification Bot 2013-06-30 20:20:22 UTC
Change 71301 had a related patch set uploaded by Reedy:
Add parsertest for {{#time:M|february}} returns mar

https://gerrit.wikimedia.org/r/71301
Comment 3 Liangent 2013-06-30 20:20:56 UTC
It's June 30 today, so February means February 30, which is actually March 2, so it's Mar.

You may want {{#time:M|February 1}} instead.
Comment 4 Rainer Rillke @commons.wikimedia 2013-06-30 20:25:24 UTC
{{#time:r|feb}} --> Sat, 02 Mar 2013 00:00:00 +0000
{{#time:r|mar}} --> Sat, 30 Mar 2013 00:00:00 +0000
Comment 5 Sam Reed (reedy) 2013-06-30 21:55:57 UTC
Slightly strange, but not a bug
Comment 6 Gerrit Notification Bot 2013-06-30 21:56:12 UTC
Change 71301 abandoned by Reedy:
Add parsertest for {{#time:M|february}} returns mar

https://gerrit.wikimedia.org/r/71301
Comment 7 Jesús Martínez Novo (Ciencia Al Poder) 2013-12-30 20:44:11 UTC
*** Bug 59137 has been marked as a duplicate of this bug. ***
Comment 8 john_of_reading 2014-04-30 09:58:21 UTC
(In reply to Liangent from comment #3)

> You may want {{#time:M|February 1}} instead.

Unfortunately the {{dts}} template needs to fetch the month from an arbitrary date string that may or may not have a day number.

https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_%28technical%29&diff=606439303&oldid=606432378
Comment 9 Cristian B. 2014-04-30 10:41:55 UTC
(In reply to Sam Reed (reedy) from comment #5)
> Slightly strange, but not a bug

WTH do you mean "not a bug"?!? The code should NEVER use current day instead of "1st". Or current month instead of January for that matter, since IIRC there were some weeks in the 1700s that were skipped altogether, so they should be avoided too.

Please reopen and reconsider.
Comment 10 Liangent 2014-04-30 13:10:13 UTC
If so, please upstream this as a php bug. IIRC a php function is used directly to parse date string.
Comment 11 Mr. Stradivarius 2014-04-30 13:18:54 UTC
Adding an arbitrary year has solved the problem in enwiki's {{dts}} template. The code goes something like {{#time:m|1-{{{month}}}-2000}}.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links