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

Joshua Yeidel yeidel at wsu.edu
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

-- Joshua





On 3/10/06 3:37 AM, "Bierens,Gerard G.J.M." <G.Bierens at fontys.nl> 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.
> ----------------------------------------------------------------
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l




More information about the MediaWiki-l mailing list