RE: [PHP] adding days to a given date

2004-03-31 Thread Hawkes, Richard
add the required seconds! Cheers Richard -Original Message- From: Merlin [mailto:[EMAIL PROTECTED] Sent: 31 March 2004 10:01 To: [EMAIL PROTECTED] Subject: [PHP] adding days to a given date Hi there, I am trying to add days to a given day, but somehow I am lost in all the time functions

Re: [PHP] adding days to a given date

2004-03-31 Thread Jason Wong
On Wednesday 31 March 2004 17:08, Hawkes, Richard wrote: You'll want to do something like this: $timeStamp = strtotime(2004-04-29); $timeStamp += 24 * 60 * 60 * 7; // (add 7 days) $newDate = date(Y-m-d, $timeStamp); The 'strtotime' function converts all sorts of standard dates to the

RE: [PHP] adding days to a given date

2004-03-31 Thread Hawkes, Richard
What else can it do other than convert dates to time strings Jason? -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: 31 March 2004 10:13 To: [EMAIL PROTECTED] Subject: Re: [PHP] adding days to a given date On Wednesday 31 March 2004 17:08, Hawkes, Richard wrote

Re: [PHP] adding days to a given date

2004-03-31 Thread Merlin
to the Unix Epoch seconds (seconds since 1/1/1970). You then just add the required seconds! Cheers Richard -Original Message- From: Merlin [mailto:[EMAIL PROTECTED] Sent: 31 March 2004 10:01 To: [EMAIL PROTECTED] Subject: [PHP] adding days to a given date Hi there, I am trying to add

[PHP] adding days to a given date

2004-03-31 Thread Merlin
Hi there, I am trying to add days to a given day, but somehow I am lost in all the time functions. This should be a standard function. Maybe someone has a good hint for me? This is the given day: 2004-04-29 I would like to add 2 days to it. So php should anyhow now how many days April has to

RE: [PHP] adding days to a given date

2004-03-31 Thread Harish
function, like its specified above. You can also +/- the months and year if necessary. regards Harish -Original Message- From: Merlin [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 31, 2004 2:31 PM To: [EMAIL PROTECTED] Subject: [PHP] adding days to a given date Hi there, I am

Re[2]: [PHP] adding days to a given date

2004-03-31 Thread Richard Davey
Hello Richard, Wednesday, March 31, 2004, 10:14:39 AM, you wrote: JW strtotime() can do more than that, time to RTFM. RH What else can it do other than convert dates to time strings Jason? I have to agree with Jason on this one - the following code is just reinventing the wheel: $timeStamp =