On Fri, Nov 21, 2003 at 11:15:20AM -0500, Jeff Lewis wrote:
> Sorry, I may have muddled that...the issue isn't converting a string to
> a time, it's taking a time (1026360000 for example) and adding 30 days
> to that.

Ah, but it is an issue of converting a string to a time.  strtotime()
can "Parse about any English textual datetime description into a UNIX
timestamp".  It also has a handy optional parameter telling you when to
consider "now".  So to add thirty days to "now" (1026360000 in your
example):

<?php
$now = however_you_get_your_timestamp();
$future = strtotime('+30 days', $now);
?>

Such a handy function -- no need to worry about leap years, number of
days in a month, etc...

-- 
[ joel boonstra | gospelcom.net ]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to