Re: Last Day of Year Date Bug?
- From: "Rik Wasmus" <luiheidsgoeroe@xxxxxxxxxxx>
- Date: Mon, 31 Dec 2007 17:43:30 +0100
On Mon, 31 Dec 2007 17:28:11 +0100, ashore <shoreas@xxxxxxxxx> wrote:
Feature or bug, that's pretty bad (where 'bad' == 'non-intuitive')..
Well, it's something I rather depend on most of the time actually. How do you propose it should handle '31-11-XXXX'? An error/exception perhaps, that would be justifiable. Just setting it back to 30-11 would be inexcusable.
While correcting this will prbly break a lot of applications, mebbe
it's time for another date set of functions.
What DO you guys use to 'go back one month' reliably?
Depends on the use. In some cases, taking 01-12-2007 as one month before 31-12-2007 is just what I want. In your context, why do you bother with the day part?
print date("M `y", mktime(0, 0, 0, date("m")-1, 1,date("Y")));
--
Rik Wasmus
.
- References:
- Re: Last Day of Year Date Bug?
- From: Rik Wasmus
- Re: Last Day of Year Date Bug?
- From: Jerry Stuckle
- Re: Last Day of Year Date Bug?
- From: ashore
- Re: Last Day of Year Date Bug?
- Prev by Date: Re: Last Day of Year Date Bug?
- Next by Date: Re: Last Day of Year Date Bug?
- Previous by thread: Re: Last Day of Year Date Bug?
- Next by thread: Re: Last Day of Year Date Bug?
- Index(es):