w3resource

PHP: jewishtojd() function

Description

The jewishtojd() function converts a Jewish calendar date to a Julian day count.

Note : 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.

Version:

(PHP 4 and above)

Syntax:

jewishtojd(month, day, year)

Parameters:

Name Description Required /
Optional
Type
month Specified month (from 1 to 13) from the Jewish calendar. Required Integer
day Specified day (from 1 to 30 ) from the Jewish calendar. Required Integer
year Specified year (between 1 and 9999 )from the Jewish calendar. Required Integer

Return value:

The Julian day.

Value Type: Integer.

Example:

<?php
echo(jewishtojd(4, 5, 5863));
?>

Sample Output:

2489148

View the example in the browser

See also

PHP Function Reference

Previous: jdtounix
Next: JulianToJD



Follow us on Facebook and Twitter for latest update.