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]
|