ID: 13888
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Date/time related
Operating System: Red Hat 6.2
PHP Version: 4.0.4pl1
New Comment:

I'm disagree with cnewbill.

For example in 30 Apr, next was 01 May, and in 30 Jun next was 01 Jul.

Why in october doesn't it work?

Previous Comments:
------------------------------------------------------------------------

[2001-10-31 12:11:16] [EMAIL PROTECTED]

There is no Novemeber 31st, this is why it is returning December; it skips to the 
equivalent day which would be the 1st of Dec. Same with Septemeber.

This is desired behavior.

-Chris


------------------------------------------------------------------------

[2001-10-31 12:07:52] [EMAIL PROTECTED]

might be daylight saving time related?

it's always better to use mktime(12,0,0,...
instead of mktime(0,0,0,... 
when you care about date only but not time ...

------------------------------------------------------------------------

[2001-10-31 11:57:25] [EMAIL PROTECTED]

I have a problem with date() function;

In my PC, Today is 31-October-2001.
I would like to obtain precedent month and next month with this clause:

$month_before = date('m',  mktime(0,0,0,date("m")-1,date("d"),date("Y")));

$month_next = date('m',  mktime(0,0,0,date("m")+1,date("d"),date("Y")));

Surprisingly, I get this result:
$month_before is equal to 10
$month_next is equal to 12

This error just ocurrs this day "31-10-2001". Another day is ok.

I don't understand it !!!

Can anyone help me ??

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=13888&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to