PHP Velho Oeste 2024

jewishtojd

(PHP 4, PHP 5, PHP 7)

jewishtojdConverts a date in the Jewish Calendar to Julian Day Count

Descrierea

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

Although this function can handle dates all the way back to the year 1 (3761 B.C.), such use may not be meaningful. The Jewish calendar has been in use for several thousand years, but in the early days there was no formula to determine the start of a month. A new month was started when the new moon was first observed.

Parametri

month

The month as a number from 1 to 13, where 1 means Tishri, 13 means Elul, and 6 and 7 mean Adar in regular years, but Adar I and Adar II, respectively, in leap years.

day

The day as a number from 1 to 30. If the month has only 29 days, the first day of the following month is assumed.

year

The year as a number between 1 and 9999

Valorile întoarse

The julian day for the given jewish date as an integer.

A se vedea și

  • jdtojewish() - Converts a Julian day count to a Jewish calendar date
  • cal_to_jd() - Converts from a supported calendar to Julian Day Count

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