Commit graph

11 commits

Author SHA1 Message Date
Siebrand Mazeland aabd2bf24f Add test and output for {{#time:d F Y|1988-02-28|nl}}. This test should pass.
Would be nice if it was possible to add a test for {{#time:d F Y|1988-02-28|user}} where user language is "nl", because that does not work. Ref bug 28655 comment 10 and comment 17.
2011-12-21 21:59:38 +00:00
Brian Wolff c763bf6ce1 (bug 32351) Make #time[l] support explicitly specified timezones. Patch by Van de Bugger.
This would make something like {{#time:H:i:s| 9:30 January 1, 2012 MST}} convert the time from 9:30 mountatin standard time to whatever it is in UTC.

I made one minor change from the patch on bugzilla in changing an @ to a wfSuppressWarnings. (The @ was already in the code, it wasn't introduced by the patch).
2011-12-07 20:52:41 +00:00
Max Semenik 0055784a24 Follow-up to r67044: moved string function tests to a separate file protected by conditional, tweaked test runner to skip instead of exploding when required function hook is not found. 2010-07-09 21:11:54 +00:00
Max Semenik 1b75afd18d (bug 19940) urldecode dropped during StringFunctions-ParserFunctions merger 2010-05-29 16:12:41 +00:00
Alexandre Emsenhuber 75842e93a2 Follow-up r63906: add test case 2010-03-18 16:31:51 +00:00
Tim Starling 2a677438fa Revert r62436 and associated parser test. If you really want to make {{#ifexist:foo}} work the same way as [[File:foo]], which is presumably what bug 14779 is getting at, then you should do a proper job of it, and not introduce your own special #ifexist-specific syntax for specifying files. 2010-02-19 07:32:11 +00:00
Conrad Irwin 018bc0a353 Prevent duplicate warnings when running lots of parser tests. 2010-02-15 14:45:33 +00:00
Platonides 01ac7b9606 Add parsertests for #if, #ifeq, #iferror, #ifexpr from http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions PD examples. 2010-02-13 15:49:05 +00:00
Platonides 9fbeadd46f (Bug 14779) {{#ifexist}} does not recognise URL encoded filenames
Solution provided by Umherirrender
2010-02-13 15:08:25 +00:00
Aryeh Gregor 6905775132 Make default values fall through in switch
Bug 19093.  Previously {{#switch:foo|bar|#default=baz}} would behave
differently from {{#switch:foo|#default|bar=baz}}, even though they'd
behave identically if "#default" was replaced by "foo".

I changed switchObj but not switchHook.  In testing, switchObj was the
only method that seemed to be used, and I didn't want to make untested
changes to switchHook, so if that's used, the behavior may remain in
some cases.  It seems like code is duplicated between them -- whatever
the difference is, that should probably be factored out.

This passes all existing parser tests for #switch, of which there are
none, so don't blame me if it breaks something.  ;)
2009-06-05 16:53:59 +00:00
Brion Vibber 8a8fcf7466 * (bug 11686) Make #time work with pre-1970 dates
Uses DateTime class in PHP 5.2+ to support dates outside the 1970-2038 range. On earlier versions will still fall back to strtotime with the old 32-bit Unix timestamp range limitations.
Patch by rememberthedot -- https://bugzilla.wikimedia.org/attachment.cgi?id=5416

Added a couple quick parser test cases to confirm the new behavior. However I am seeing some annoyances with how input time zones are handled, so we'll want to clean that up at some point. :)
2008-10-27 17:56:58 +00:00