Keith Spiller wrote:
Hi Vlad,
Thank you for taking the time to help me.
The code:
$prev_month = date('F Y', mktime(0, 0, 0, 0, date('m') - 6, date('Y')));
$next_month = date('F Y', mktime(0, 0, 0, 0, date('m') + 6, date('Y')));
echo "$prev_month \n";
echo "$next_month \n";
Generates:
N
v_month \n";
echo "$next_month \n";
Generates:
November 2006
December 2006
The $prev_month value seems correct,
but the $next_month value should be:
December 2008
Do you see my mistake?
Keith
- Original Message -
From: "Vlad Vlasceanu" <[EMAIL PROTECTED]>
time() returns a unix timestamp of the current moment in time (now), so
in effect you are adding or subtracting 6 seconds to that.
calling:
date('m/d/Y', time());
is the same as calling:
date('m/d/Y');
On the other hand:
mktime(hour, minute, second, month, day, year) generates a timestamp
such
3 matches
Mail list logo