php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63932 cal_from_jd numbering for Jewish months is not explained
Submitted: 2013-01-07 17:56 UTC Modified: 2017-09-04 11:30 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: r07271368 at hotmail dot com Assigned:
Status: Verified Package: Calendar related
PHP Version: Irrelevant OS: testbed at tehplayground.com
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: r07271368 at hotmail dot com
New email:
PHP Version: OS:

 

 [2013-01-07 17:56 UTC] r07271368 at hotmail dot com
Description:
------------
The numbering that cal_from_jd uses for Jewish months is not explained in the documentation.

Apparently, the first six months of the Jewish year (counting from Tishri) are numbered 1 to 6; the last six months are numbered 8 to 13; and 7 appears as a month number only if the year has 13 months total. If the year is 12 months in length, then the number 7 is skipped in the month numbering.

Also, the name "AdarI" is used for Adar in all years, not just years with 13 months.



Test script:
---------------
$n = 2456150;

for ($i=1; $i<=150; $i++) {
    $a = cal_from_jd($n, CAL_GREGORIAN);
    $b = cal_from_jd($n, CAL_JEWISH);
    echo $a['date']."  ";
    echo $b['date']."  ";
    echo $b['monthname']."\n";
    $n+=15;
}

Expected result:
----------------
The script shows Gregorian and corresponding Jewish dates at 15-day intervals. A Jewish month is either 29 or 30 days. Therefore, the interval is too short to skip over any months.


Actual result:
--------------
Please observe the sequence of month names and month numbers returned by the script.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-04 11:30 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2017-09-04 11:30 UTC] cmb@php.net
> The numbering that cal_from_jd uses for Jewish months is not
> explained in the documentation.

Indeed. However, the jdmonthname and jewishtojd man pages have some
information about this.

> Also, the name "AdarI" is used for Adar in all years, not just
> years with 13 months.

This has been reported as bug #54254, and fixed as of PHP 5.5.0.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 15:01:30 2024 UTC