|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-09-04 11:30 UTC] cmb@php.net
-Status: Open
+Status: Verified
[2017-09-04 11:30 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 19:00:01 2025 UTC |
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.