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
 [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

Pull Requests

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: Sat Dec 21 13:01:31 2024 UTC