User "Kaldari" posted a comment on MediaWiki.r86927.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/86927#c16416
Commit summary:

adding language support to #time parser function, per bug 28655

Comment:

I'm not sure if my previous explanation makes any sense, so let me try it 
again...

Before this rev, the only params actually used by the parser function #time 
were $format and $date. The $local param was tacked on so that 
#timel/localtime() could just piggyback off the time function instead of having 
redundant code. The $local param was never intended for use by #time (since 
<nowiki>{{#time:Y|1945|true}}</nowiki> is the same as 
<nowiki>{{#timel:Y|1945}}</nowiki> and <nowiki>{{#time:Y|1945|false}}</nowiki> 
is the same as <nowiki>{{#time:Y|1945}}</nowiki>) and the parameter's presence 
is not reflected in the documentation for the parser function. Since I want the 
$language parameter to actually be used by #time, I put it at the end of the 
parser function parameters (but not the end of the underlying function's 
parameters). That way it can be used by #time without forcing people to start 
inserting a '|false' into the call before the language parameter. Since 
#timel/localtime() is the only thing that actually uses the $local param in 
time() (I checked), I only have to change the call there to make sure nothing 
breaks. Hope that makes sense.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to