|
Posted by NC on 10/13/48 11:48
ivan wrote:
>
> just one small question concerning 'previous month':
>
> the function date ("m") gives me the current month.
>
> So, date("m")-1 returns the previous month.
>
> But, if the current month is "01", will this return "12" or "00" ?
0. If you want the previous month, you need to use something like
this:
date('m', strtotime ('-1 month'));
Cheers,
NC
Navigation:
[Reply to this message]
|