PHP Velho Oeste 2024

jewishtojd

(PHP 4, PHP 5, PHP 7, PHP 8)

jewishtojdユダヤ暦の日付けをユリウス積算日に変換する

説明

jewishtojd(int $month, int $day, int $year): int

この関数では1年(紀元前3761年)に遡って全ての日々を扱うこと が出来ますが、この様な使い方は特に意味があるわけではありません。 ユダヤ暦は数千年に渡って使われていますが、当初は月の 始まりが決められていませんでいた。新しい月は新月が最初に観測 された日に始まりました。

パラメータ

month

月を表す、1 から 13 までの数値。 1Tishri を、 13 s Elul という意味です。 そして 6 7 は 通常の年では Adar を意味していますが、 うるう年では Adar IAdar II をそれぞれ意味しています。

day

日を表す、1 から 30 までの数値。 月が29日しかない場合、次の月のはじめの日と見なされます。

year

年を表す、1 から 9999 までの数値。

戻り値

指定したユダヤ暦の日付に対応するユリウス積算日を返します。

参考

  • jdtojewish() - ユリウス積算日をユダヤ暦に変換する
  • cal_to_jd() - サポートされるカレンダーからユリウス積算日に変換する

add a note add a note

User Contributed Notes 2 notes

up
3
erelsgl dot NOSPAM at cs dot technion dot ac dot il
17 years ago
For non-leap years, this function returns the same for month 6 (Adar I) and month 7 (Adar II), so, for example:

<?php
JewishToJD
(6,15,5766) === JewishToJD(7,15,5766)

JDToJewish(JewishToJD(7,15,5766)) === '6/15/5766'
?>
up
0
erelsgl dot NOSPAM at cs dot technion dot ac dot il
17 years ago
JewishToJD returns 0 when the day number is 31 or more.

However, when the day number is 30, JewishToJD returns a valid Julian Day, even when the month only has 29 days. So, for example:
<?php
JDToJewish
(JewishToJD(4,30,5767)) === "5/1/5767"
?>
To Top