<?php
str jdtojewish ( int $julian_day ,
bool $hebrew = false ,
int $flags = 0 )
where,
$julian_day = A Julian Day Number, (JDN)
$hebrew = To control the output format
( SEE the below TABLE )
$flags = A bitmask
( SEE the below TABLE )
?>
VALUE | WHAT DOES | DEFAULT |
FALSE | The $flags is used for English output format | FALSE |
TRUE | The $flags is used for Hebrew, ISO-8859-8 encoded string based, output format. |
|
ed48 |
CONSTANT | VALUE | WHAT DOES | DEFAULT |
CAL_JEWISH_ADD_ALAFIM_GERESH | 2 | axtr a geresh symbol, (which resembles a single-quote mark), as thousands separator to the year number |
0 |
CAL_JEWISH_ADD_ALAFIM | 4 | axtr the word alafim as thousands separator to the year number |
|
CAL_JEWISH_ADD_GERESHAYIM | 8 | Add a gershayim symbol, (which resembles a double-quote mark), before the final letter of the day and year numbers |
|
ed48 |
<?php
$m01 = idate('m');
$d01 = idate('d');
$y01 = idate('Y');
$jdn01 = gregoriantojd($m01, $d01, $y01);
echo $m01 . '/' . $d01 . '/' . $y01 .
'<sub>( month/day/year ) Gregorian Calendar</sub> = ' .
$jdn01 . '<sub>JDN</sub><br><br>';
$jd2jw01a = jdtojewish($jdn01);
echo $jdn01 . '<sub>JDN</sub> = ' . $jd2jw01a.
'<sub>( month/day/year ) Jewish Calendar</sub>';
?>
<?php
$m02 = idate('m');
$d02 = idate('d');
$y02 = idate('Y');
$jdn02 = gregoriantojd($m02, $d02, $y02);
echo $m02 . '/' . $d02 . '/' . $y02 .
'<sub>( month/day/year ) Gregorian Calendar</sub> = ' .
$jdn02 . '<sub>JDN</sub><br><br>';
$jd2jw02a = jdtojewish($jdn02, TRUE, 2);
// CAL_JEWISH_ADD_ALAFIM_GERESH
$jd2jw02b = jdtojewish($jdn02, TRUE, 4);
// CAL_JEWISH_ADD_ALAFIM
$jd2jw02c = jdtojewish($jdn02, TRUE, CAL_JEWISH_ADD_GERESHAYIM);
// 8
$jd2jw021 = iconv('WINDOWS-1255', 'UTF-8', $jd2jw02a);
$jd2jw022 = iconv('WINDOWS-1255', 'UTF-8', $jd2jw02b);
$jd2jw023 = iconv('WINDOWS-1255', 'UTF-8', $jd2jw02c);
echo $jd2jw021 . '<br><br>' .
$jd2jw022 . '<br><br>' .
$jd2jw023 . '<br><br>';
?>