Reply to Re: date arithmetic

Your name:

Reply:


Posted by NC on 12/05/06 21:47

wesley@ispace.co.za wrote:
>
> I have searched through the archives but did not find a solution
> to this. Is there a way to get the last day of the month.

Yes:

$days = date('t');

This will return the number of days in the current month.

> Is there also a way to determine the date, one month from now
> without actually checking the date and the Leap year?

Yes:

$oneMonthFromNow = strtotime('+ 1 month');

But make sure if this returns what you expect it to; "one month"
starting on October 31, for example, would end on December 1...

Cheers,
NC

[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

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