Bug #54254 [Csd]: cal_from_jd returns month = 6 when there is only one Adar
Edit report at https://bugs.php.net/bug.php?id=54254&edit=1
ID: 54254
Updated by: cmb@php.net
Reported by: asphp at dsgml dot com
Summary: cal_from_jd returns month = 6 when there is only one
Adar
Status: Closed
Type: Bug
Package: Calendar related
PHP Version: 5.3.5
Assigned To: stas
Block user comment: N
Private report: N
New Comment:
> I think the bug still exists.
> Under 5.4.9 [â¦]
The bug has been fixed as of PHP 5.5.0 only, see
<https://3v4l.org/CBfRv>.
Previous Comments:
------------------------------------------------------------------------
[2013-09-19 20:51:31] oc666 at netvision dot net dot il
I think the bug still exists.
Under 5.4.9 I get the same results like in the reproduce example:
Array
(
[date] => 6/24/5772
[month] => 6
[day] => 24
[year] => 5772
[dow] => 0
[abbrevdayname] => Sun
[dayname] => Sunday
[abbrevmonth] => AdarI
[monthname] => AdarI
)
0
29
------------------------------------------------------------------------
[2012-08-07 08:49:33] stas@php.net
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
fixed in master
------------------------------------------------------------------------
[2012-03-29 18:33:50] asphp at dsgml dot com
woordengeschrift you misunderstand the Hebrew calendar.
In non-leap years there is a gap, the calendar months go: 4,5,7,8 - month 6 is skipped.
Unfortunately PHP does 4,5,6,8 - it skips month 7 instead of 6 which is incorrect.
In a leap year it is AdarI that is added - AdarII is the same as Adar. Yes, I know you would expect
the second one to be the "extra", but that's not how the calendar works.
------------------------------------------------------------------------
[2012-03-29 12:13:03] info at woordengeschrift dot nl
In NON-leap years, there is only the unnumbered month of Adar.
------------------------------------------------------------------------
[2012-03-29 12:09:41] info at woordengeschrift dot nl
In leap years, there is only the unnumbered month of Adar.
Numbered Adars only occur in leap years: Adar_I (the actual leap month),
followed by Adar_II.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=54254
--
Edit this bug report at https://bugs.php.net/bug.php?id=54254&edit=1
Thread (7 messages)