php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15299 getdate function returns 'March' for month 2 and month 3
Submitted: 2002-01-30 09:24 UTC Modified: 2002-01-30 19:45 UTC
From: davedill at hotmail dot com Assigned:
Status: Not a bug Package: Calendar related
PHP Version: 4.1.1 OS: Linux, Windows98
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
2 + 13 = ?
Subscribe to this entry?

 
 [2002-01-30 09:24 UTC] davedill at hotmail dot com
PHP Version 4.0B2 (Linux) and PHP Version 4.0.6 (Windows) both show same problem

$month=2 or $month=3 both produce 'March' as output ($monthName)

$day=date("j");
$year=date("Y");
$dateArray=getdate(mktime(0,0,0,$month,$day,$year));
$monthName=$dateArray["month"];
return $monthName;

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-30 11:42 UTC] jimw@php.net
the thirtieth day of february is in march.
 [2002-01-30 19:46 UTC] davedill at hotmail dot com
Yes, that occurred to me a couple of hours after I submitted this. Sorry!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 11:01:28 2024 UTC