HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

jewishtojd

Description

The jewishtojd of Calendar for PHP converts a date in the Jewish Calendar to Julian Day Count.

Syntax

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

Parameters

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

Return

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

Examples

1 · month day year

<?

$month = 1;
$day = 1;
$year = 1;

$return = jewishtojd($month, $day, $year);

echo $return;
347998

2 · Overflow

<?

$month1 = 4;
$month2 = 5;
$day1 = 30;
$day2 = 1;
$year = 1;

$return1 = jewishtojd($month1, $day1, $year);
$return2 = jewishtojd($month2, $day2, $year);

echo $return1 . PHP_EOL;
echo $return2;
348117
348117