You are here: Re: Last Day of Year Date Bug? « PHP Programming Language « IT news, forums, messages
Re: Last Day of Year Date Bug?

Posted by larry on 01/01/08 03:31

On Dec 31, 8:28 am, ashore <shor...@gmail.com> wrote:
> Feature or bug, that's pretty bad (where 'bad' == 'non-intuitive').
>
> 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?
>
> -AS

I use 1 as the day, if I want to find the last month, or a simple
$lastmonth = ($curmonth == 1,12, $curmonth -1);

The date with mktime is great for calculating out an arbitrary date
such as add 30 days to the current date, etc. It's not a bug, but a
great feature, if you understand how it works.

Here is some date arithmetic I posted that uses mktime, just to give
you an idea.

http://groups.google.com/group/comp.lang.php/browse_frm/thread/c8637f47a9537ff3/f3d94e81f2ec396a

 

Navigation:

[Reply to this 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

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