Reply to Re: Last Day of Year Date Bug?

Your name:

Reply:


Posted by Rik Wasmus on 12/31/07 16:43

On Mon, 31 Dec 2007 17:28:11 +0100, ashore <shoreas@gmail.com> wrote:
> Feature or bug, that's pretty bad (where 'bad' =3D=3D 'non-intuitive')=
..

Well, it's something I rather depend on most of the time actually. How d=
o =

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация