Bug #70687 [Opn->Ver]: Month List for 5775 Incorrect
| From: | cmb@php.net | Date: | Sun, 03 Sep 2017 16:19:38 +0000 |
| Subject: | Bug #70687 [Opn->Ver]: Month List for 5775 Incorrect | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210922@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70687&edit=1
ID: 70687
Updated by: cmb@php.net
Reported by: daniel at ohr dot edu
Summary: Month List for 5775 Incorrect
-Status: Open
+Status: Verified
Type: Bug
Package: Calendar related
Operating System: Mac OS X
PHP Version: 5.6.14
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
> 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.
Previous Comments:
------------------------------------------------------------------------
[2015-10-10 20:13:03] 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. × ×××× ×תשע×
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70687&edit=1