[Mediawiki-l] {{CURRENTMONTHNAME}} minus one

Bierens,Gerard G.J.M. G.Bierens at fontys.nl
Wed Mar 15 10:38:00 UTC 2006


Hello Joshua,
That makes sense to me, but where do I add this code?
 
-- Gerard
 
Joshua Yeidel yeidel at wsu.edu
<mailto:mediawiki-l%40Wikimedia.org?Subject=%5BMediawiki-l%5D%20%7B%7BCU
RRENTMONTHNAME%7D%7D%20minus%20one&In-Reply-To=399E1B1730511340ACC9D56B8
48CFF652443D4%40KOOTENAY.medewerker.fontys.local> 

Sat Mar 11 02:23:17 UTC 2006
 
Try:
 
$lastmonthname = date("F", mktime(0, 0, 0, date("m")-1, date("d"),
date("Y")));
 
It may depend on your version of PHP;  there have been changes to
date/time
functions, some of which are documented at:
 
http://us2.php.net/manual/en/function.date.php
<http://us2.php.net/manual/en/function.date.php> 
 
-- Joshua
 
 
 
 
 
On 3/10/06 3:37 AM, "Bierens,Gerard G.J.M." <G.Bierens at fontys.nl
<http://mail.wikipedia.org/mailman/listinfo/mediawiki-l> > wrote:
 
> Just like {{CURRENTMONTHNAME}} would give 'March', is it possible to
> automatically get the previous month?
> 
>  
> 
>  
> 
>  
> 
> Thanks,
> 
> Gerard 
> 

 



----------------------------------------------------------------
Op deze e-mail zijn de volgende voorwaarden van toepassing:

http://www.fontys.nl/disclaimer

The above disclaimer applies to this e-mail message.
----------------------------------------------------------------



More information about the MediaWiki-l mailing list