php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #70687 Month List for 5775 Incorrect
Submitted: 2015-10-10 20:13 UTC Modified: 2017-09-03 16:32 UTC
From: daniel at ohr dot edu Assigned: cmb (profile)
Status: Closed Package: Calendar related
PHP Version: 5.6.14 OS: Mac OS X
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: daniel at ohr dot edu
New email:
PHP Version: OS:

 

 [2015-10-10 20:13 UTC] daniel at ohr dot edu
Description:
------------
The script executes fine
the problem is that Elul IS NOT THE 13th Month in a non-Leap year
5775 is not a leap year
5776 is a leap year
I don't understand how Elul is the 13 month?
there are 12 months in a regular non-leap Jewish Year

In point of fact
to list the months in this order is both confusing and incorrect
the first month of the year in Jewish calendar is Nissan
the change of the year is in Tishri which makes Tishri the 7th Month and Adar the 12th month or Adar II the 13th month - which is logical since this month is added in a leap year!

Notice the output at 7? why is it repeated?

Test script:
---------------
for ($j = 1;$j<14;$j++) {
	echo $j.'. '.(iconv ('WINDOWS-1255', 'UTF-8', jdtojewish(jewishtojd($j,1,5775),true)));
	echo '<br />';
	
}
if (is_leap(5775)) { echo 'true' ;}
echo (5775 % 19);

Expected result:
----------------
1. א תשרי התשעה
2. א חשון התשעה
3. א כסלו התשעה
4. א טבת התשעה
5. א שבט התשעה
6. א אדר התשעה
7. א ניסן התשעה
8. א אייר התשעה
9. א סיון התשעה
10. א תמוז התשעה
11. א אב התשעה
12. א אלול התשעה


Actual result:
--------------
. א תשרי התשעה
2. א חשון התשעה
3. א כסלו התשעה
4. א טבת התשעה
5. א שבט התשעה
6. א אדר התשעה
7. א אדר התשעה
8. א ניסן התשעה
9. א אייר התשעה
10. א סיון התשעה
11. א תמוז התשעה
12. א אב התשעה
13. א אלול התשעה

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-03 16:19 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2017-09-03 16:19 UTC] cmb@php.net
> Notice the output at 7? why is it repeated?

Because that is how jewishtojd() is supposed to work. Months 6 and
7 are always Adar (the same month) in regular years, but Adar I
and Adar II in leap years.

Changing to documentation problem.
 [2017-09-03 16:19 UTC] cmb@php.net
-Type: Bug +Type: Documentation Problem
 [2017-09-03 16:32 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=342993
Log: Fix bug #70687 (Month List for 5775 Incorrect)
 [2017-09-03 16:32 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2020-02-07 06:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=b03454fec404fdeac9eb954d48582560a2359dbe
Log: Fix bug #70687 (Month List for 5775 Incorrect)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 01:01:30 2024 UTC