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

jdtojewish

Description

The jdtojewish of Calendar for PHP converts a Julian day count to a Jewish calendar date.

Syntax

jdtojewish(
    int $julian_day,
    bool $hebrew = false,
    int $flags = 0
): string

Parameters

julian_day

A julian day number as integer

hebrew

If the hebrew parameter is set to true, the flags parameter is used for Hebrew, ISO-8859-8 encoded string based, output format.

flags

A bitmask which may consist of:

ValueConstantDescription
0CAL_JEWISH_ADD_ALAFIM_GERESHAdds a geresh symbol (which resembles a single-quote mark) as thousands separator to the year number.
1CAL_JEWISH_ADD_ALAFIMAdds the word alafim as thousands separator to the year number.
2CAL_JEWISH_ADD_GERESHAYIMAdds a gershayim symbol (which resembles a double-quote mark) before the final letter of the day and year numbers.

Return

Returns the Jewish date as a string in the form "month/day/year", or an ISO-8859-8 encoded Hebrew date string, according to the hebrew parameter.

Examples

1 · julian_day

<?

$julian_day = unixtojd();

$return = jdtojewish($julian_day);

echo $return;

?>
10/17/5784

2 · hebrew

<?

$julian_day = unixtojd();
$hebrew = true;

$return = jdtojewish($julian_day, $hebrew);
$return = mb_convert_encoding($return, "UTF-8", "ISO-8859-8");

echo $return;

?>
יז סיון התשפד

3 · flags · CAL_JEWISH_ADD_ALAFIM_GERESH

<?

$julian_day = unixtojd();
$hebrew = true;
$flags = CAL_JEWISH_ADD_ALAFIM_GERESH;

$return = jdtojewish($julian_day, $hebrew, $flags);
$return = mb_convert_encoding($return, "UTF-8", "ISO-8859-8");

echo $return;

?>
יז סיון ה'תשפד

4 · flags · CAL_JEWISH_ADD_ALAFIM

<?

$julian_day = unixtojd();
$hebrew = true;
$flags = CAL_JEWISH_ADD_ALAFIM;

$return = jdtojewish($julian_day, $hebrew, $flags);
$return = mb_convert_encoding($return, "UTF-8", "ISO-8859-8");

echo $return;

?>
יז סיון ה אלפים תשפד

5 · flags · CAL_JEWISH_ADD_GERESHAYIM

<?

$julian_day = unixtojd();
$hebrew = true;
$flags = CAL_JEWISH_ADD_GERESHAYIM;

$return = jdtojewish($julian_day, $hebrew, $flags);
$return = mb_convert_encoding($return, "UTF-8", "ISO-8859-8");

echo $return;

?>
י"ז סיון התשפ"ד
HomeMenu