[PHP] Re: Adding to a Date

2004-11-07 Thread M. Sokolewicz
Matt Cassarino wrote: Hi, I am trying to add "x" days to the current date for a calendar program that I am writing. "x" represents any integer from 1 to 7. So, for x=4, the program will get the current date 2004-11-06 and add 4 days to it: 2004-11-10 I need it to account for the next month if I

[PHP] Re: Adding to a Date

2004-11-06 Thread Jason Barnett
There are probably a lot of ways to solve this problem, but the way I would do it: create a timestamp out of whatever date you have, then add x * 24 * 60 * 60 to it and convert from the timestamp back into whatever string format date you want. -- PHP General Mailing List (http://www.php.net/) T