Reply to Re: checking a date...

Your name:

Reply:


Posted by Geoff Berrow on 10/05/35 11:53

Message-ID: <1153396561.104691.130090@i42g2000cwa.googlegroups.com> from
Mike contained the following:

>a) get the current date plus 1 year so I can store this in a db. I've
>looked at mktime() but this just adds 1 to the year. What happens if
>the current date is feb 29th. If its a leap year next year feb the
>29th won't happen?

mktime generates a unix timestamp which is the number of seconds since
Jan 1st 1970 If you add one to the year bit in mktime it will make a
time stamp one year on. Formatting the timestamp using the date
function will give you a valid date, whatever that date may be. In this
case I should think it will give you March 1st.

What's the problem?

--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011

[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

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