jdmonthname
(PHP 4, PHP 5, PHP 7, PHP 8)
jdmonthname — 返回月份名称
说明
返回 string 类型的月份名称,mode
告诉此函数要将儒略历转化为哪个历法以及哪个类型的月份名称。
模式 | 含义 | 值 |
---|---|---|
CAL_MONTH_GREGORIAN_SHORT |
公历 - 缩写 | Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec |
CAL_MONTH_GREGORIAN_LONG |
公历 | January, February, March, April, May, June, July, August, September, October, November, December |
CAL_MONTH_JULIAN_SHORT |
儒略历 - 缩写 | Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec |
CAL_MONTH_JULIAN_LONG |
儒略历 | January, February, March, April, May, June, July, August, September, October, November, December |
CAL_MONTH_JEWISH |
犹太历 | Tishri, Heshvan, Kislev, Tevet, Shevat, Adar, Adar I, Adar II, Nisan, Iyyar, Sivan, Tammuz, Av, Elul |
CAL_MONTH_FRENCH |
法国历 | Vendemiaire, Brumaire, Frimaire, Nivose, Pluviose, Ventose, Germinal, Floreal, Prairial, Messidor, Thermidor, Fructidor, Extra |
参数
jday
-
用来计算的儒略日
mode
-
历法模式(见上表)。
返回值
指定的儒略日和 mode
的月份的名称。
+添加备注
用户贡献的备注 1 note
marc at linkitdesign dot com ¶
11 years ago
Regarding the jewish date system. It may be worth noting the following peculiarities, some obvious some not so.
1. Jewish days start at sunset NOT midnight so when converting from a Gregorian date to a Jewish one it might be worth asking if the date/time occurred 'after sunset'.
2. Jewish leap years follow a 19 year cycle which can be calculated like this:
function isJLeapYear($JYear) {
if ( ((7 * $JYear + 1) % 19) < 7 )
return true;
else
return false;
}
3. During a leap year a new leap-month called "Adar I" is inserted BEFORE the normal month of Adar.
4. During leap years, Adar is renamed "Adar II".
5. Adar/Adar II has 29 days
6. Adar I has 30 days
7. Cheshvan & Kislev have between 29 & 30 Days
8. Leap years have between 383 and 385 days.
8. non-leap years have between 353 and 355 days.
9 . In a 354-day year, months have alternating 30 and 29 day lengths.
10. In a 353-day year, the month of Kislev is reduced to 29 days.
11. In a 355-day year, the month of Cheshvan is increased to 30 days.
12. Leap years years follow the same pattern, with the addition of the 30-day Adar I as well.