or [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 10, 2004 11:58 AM
> To: [EMAIL PROTECTED]
> Cc: Louie Miranda
> Subject: RE: [PHP] Adding +7 more days on date() value problem
>
>
> I disagree on the strtotime recommendations that everyone
> else gave. The
> mk
--
> From: M. Sokolewicz [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 10, 2004 4:08 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Adding +7 more days on date() value problem
>
>
> Why would you do such strange things? It's a lot more simple :P
>
> $now =
Actually, I stand corrected on this one, it will be off by an hour on
daylight savings change date (either one).
Warren Vail
-Original Message-
From: M. Sokolewicz [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 1:08 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Adding +7 more
] Adding +7 more days on date() value problem
I disagree on the strtotime recommendations that everyone else gave. The
mktime() function itself will compensate for leap years, "day = 36" type
stuff and all of that.
";
Echo "+7 Dats Date: $plus7";
?>
Simple as that!
I believe this one will be off by an hour on leap day.
Warren Vail
-Original Message-
From: M. Sokolewicz [mailto:[EMAIL PROTECTED]
Sent: Friday, September 10, 2004 1:08 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Adding +7 more days on date() value problem
Why would you do such
Why would you do such strange things? It's a lot more simple :P
$now = time();
$plus7 = $now+(7*24*60*60); // 7 days, containing 24 hours each,
containing 60 minutes each, containing 60 seconds each.
echo 'Current Date: '.date('Y-m-d', $now);
echo 'Date in 7 days: '.date('Y-m-d', $plus7);
now isn
I disagree on the strtotime recommendations that everyone else gave.
The mktime() function itself will compensate for leap years, "day = 36"
type stuff and all of that.
";
Echo "+7 Dats Date: $plus7";
?>
Simple as that!
-TG
> -Original Message-
> From: Louie Miranda [mailto:[EMAIL PROT
Definately check out strtotime() function, way easier than adding up
the seconds of a timestamp, or breaking apart a getdate array.
Jason
On Wed, 28 Jul 2004 11:30:42 +0800, Louie Miranda <[EMAIL PROTECTED]> wrote:
> I can't figure how could i add +7 more days on the DD (Day) value. My
> problem
On Wednesday 28 July 2004 11:30, Louie Miranda wrote:
> I can't figure how could i add +7 more days on the DD (Day) value. My
> problem is, when the day is close on the end of the month like
>
> 07/29/2004
>
> when i add +7 on 29 = 36, its obvious we dont have 36 on the calendar.
> And im creating
On Wed, 28 Jul 2004 11:30:42 +0800, Louie Miranda <[EMAIL PROTECTED]> wrote:
> I can't figure how could i add +7 more days on the DD (Day) value. My
> problem is, when the day is close on the end of the month like
>
> 07/29/2004
>
> when i add +7 on 29 = 36, its obvious we dont have 36 on the cal
10 matches
Mail list logo