Re: Last Day of Year Date Bug?
- From: "Rik Wasmus" <luiheidsgoeroe@xxxxxxxxxxx>
- Date: Mon, 31 Dec 2007 15:08:15 +0100
On Mon, 31 Dec 2007 14:18:34 +0100, Jerry Stuckle <jstucklex@xxxxxxxxxxxxx> wrote:
ashore wrote:Guys, the line below just returned "Dec 07" as the date for one month
back from today. Hardly life-threatening, but any thoughts?
<?php print date("M `y", mktime(0, 0, 0, date("m")-1, date("d"),
date("Y")));?>
AS
Interesting. Looks like it may be a bug.
Nope,
date('m')-1 = 11
date('d') = 31
31-11-2007 = 01-12-2007 as far as php is concerned.
Not 'end of a year' bug, but '31st of every month' bug (well, feature I'd say, I know what to expect), with a few bonus dates in march.
--
Rik Wasmus
.
- Follow-Ups:
- Re: Last Day of Year Date Bug?
- From: Jerry Stuckle
- Re: Last Day of Year Date Bug?
- Prev by Date: Re: PHP5 and class inheritance question
- Next by Date: Re: Last Day of Year Date Bug?
- Previous by thread: Auction Script
- Next by thread: Re: Last Day of Year Date Bug?
- Index(es):
Relevant Pages
|
|