On Mon, April 4, 2005 3:14 pm, Al said:
Suddenly my strtotime() are goofy, anyone have any ideas?
echo date('Y/m/d/H', time()). br; //2005/04/04/18
echo date('Y/m/d/H', strtotime(-1 day)). br;
//2005/04/03/18
echo date('Y/m/d/H', strtotime(last
Suddenly my strtotime() are goofy, anyone have any ideas?
echo date('Y/m/d/H', time()). br; //2005/04/04/18
echo date('Y/m/d/H', strtotime(-1 day)). br;
//2005/04/03/18
echo date('Y/m/d/H', strtotime(last Sunday)). br;
//2005/04/02/23
date(Y-m-d,strtotime(+1 month))
returns December 1st! This happens when you add 1 month to any day that
doesn't exist in the next month. Quite annoying that you have to handle
it like this:
date(Y-m-d,strtotime(+1 month,strtotime(date(Y-m-1
--
Jeff Bearer, RCHE
Webmaster,
Not a very good solution, but +4 weeks works.
Adam Voigt
[EMAIL PROTECTED]
On Thu, 2002-10-31 at 11:33, Jeff Bearer wrote:
date(Y-m-d,strtotime(+1 month))
returns December 1st! This happens when you add 1 month to any day that
doesn't exist in the next month. Quite annoying that you have
date(Y-m-d,strtotime(+1 month))
returns December 1st! This happens when you add 1 month to any day that
doesn't exist in the next month. Quite annoying that you have to handle
it like this:
date(Y-m-d,strtotime(+1 month,strtotime(date(Y-m-1
How about
echo
, but a day less ...
otherwise - do the month more. I haven't tested it - but it should give the
results you want.
-Original Message-
From: 1LT John W. Holmes [mailto:holmes072000;charter.net]
Sent: 31 October 2002 17:10
To: Jeff Bearer; [EMAIL PROTECTED]
Subject: Re: [PHP] strtotime bug? end
Actually I only needed date(Y-m) so my solution works fine, and I
didn't consider the problems with hard coding 1 into it. But thanks for
the replies.
On Thu, 2002-10-31 at 11:33, Jeff Bearer wrote:
date(Y-m-d,strtotime(+1 month))
returns December 1st! This happens when you add 1 month
7 matches
Mail list logo