php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #49259 Add month 13 to date_parse()
Submitted: 2009-08-14 18:02 UTC Modified: 2009-08-14 23:30 UTC
From: alan at wilcoxengineering dot com Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 5.2.10 OS: Linux
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alan at wilcoxengineering dot com
New email:
PHP Version: OS:

 

 [2009-08-14 18:02 UTC] alan at wilcoxengineering dot com
Description:
------------
date_parse expects months 1..12 only.

date_parse("13/1/5769")  for  month=13, Ehul in Jewish calendar, results 
in  month==3 instead of month==13.

It does, however, report the error array showing "Unexpected Character."

It would be nice if date_parse could handle the months properly (just 
report back a "13" for the month). The older approach of substr() is my 
workaround.

Reproduce code:
---------------
---
From manual page: function.date-parse
---
date_parse("13/1/5769")  

Expected result:
----------------
Array for month should show 13 instead of 3


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-14 23:30 UTC] derick@php.net
The date_parse() function is meant to parse dates in the proleptic Gregorian calendar.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 20:01:29 2024 UTC