Re: [PHP] Date Issue



On Mon, Mar 31, 2008 at 3:07 PM, <admin@xxxxxxxxxxxxxxxxxxx> wrote:
Not understanding why this is happening.

$month = date("F", mktime(0,0,0, date(m), date(d), date(Y)));
$zomonth = date("F", mktime(0,0,0, date(m)-1, date(d), date(Y)));

echoing out the exact same month
March
March

Checked server timezone/date/time all is good. Am I half asleep at the wheel on this one and just not seeing my mistake here?

mktime "will automatically calculate the correct value for out-of-range input."

The "31st day of February in 2008" is March 2nd, so both dates are in March.

Andrew
.



Relevant Pages

  • Date Issue
    ... echoing out the exact same month ... Checked server timezone/date/time all is good. ... Am I half asleep at the wheel on this one and just not seeing my mistake here? ...
    (php.general)
  • Paul and Willie
    ... WILLIE NELSON & ASLEEP AT THE WHEEL ... ALBUM: WILLIE AND THE WHEEL ...
    (alt.fan.letterman)
  • Re: Trucker gets 7 years in Florida crash
    ... There is no question that he fell asleep at the wheel, ... Crete Carriers, Inc. had an excellent safety record prior to that day, ... The've never allowed drivers to ...
    (rec.autos.driving)
  • Re: M1 Today
    ... >> very similar accident last December, where a HGV driver fell asleep at ... >> the wheel near J16, then crossed the central reservation, hit oncoming ...
    (uk.rec.cars.misc)
  • Re: Deere Dario Franchitti:
    ... How many of those IRL chassis were trashed this weekend? ... of brain-dead talent gets behind the wheel and falls asleep at the ... realize the race was over. ...
    (rec.autos.sport.indy)