note 19585 modified in function.jdtojewish by pollita
| From: | pollita@php.net | Date: | Thu, 12 Jun 2003 15:11:58 +0000 |
| Subject: | note 19585 modified in function.jdtojewish by pollita | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-50237@lists.php.net to get a copy of this message | ||
There's probably a simpler way to do this, but I needed to convert a Gregorian date to a Hebrew
one and display it with the Hebrew month name (not the number).
Perhaps it can help somebody...
<?
//enter your Gregorian date with the variables $gregorianMonth, $gregorianDay, and $gregorianYear
using the numerical representation of the month
$jdDate = gregoriantojd ( $gregorianMonth, $gregorianDay, $gregorianYear);
$gregorianMonthName = jdmonthname ( $jdDate, 1 );
$hebrewDate = jdtojewish ($jdDate);
list ($hebrewMonth, $hebrewDay, $hebrewYear) = split ('/', $hebrewDate);
$hebrewMonthName = jdmonthname ( $jdDate, 4);
echo "Your date in Hebrew would read: $hebrewDay $hebrewMonthName $hebrewYear";
?>
--was--
There's probably a simpler way to do this, but I needed to convert a Gregorian date to a Hebrew
one and display it with the Hebrew month name (not the number).
Perhaps it can help somebody...
<?
//enter your Gregorian date with the variables $gregorianMonth, $gregorianDay, and $gregorianYear
using the numerical representation of the month
$jdDate = gregoriantojd ( $gregorianMonth, $gregorianDay, $gregorianYear);
$hebrewMonthName = jdmonthname ( $jdDate, 1 );
$hebrewDate = jdtojewish ($jdDate);
list ($hebrewMonth, $hebrewDay, $hebrewYear) = split ('/', $hebrewDate);
$hebrewMonthName = jdmonthname ( $jdDate, 4);
echo "Your date in Hebrew would read: $hebrewDay $hebrewMonthName $hebrewYear";
?>
http://www.php.net/manual/en/function.jdtojewish.php