note 19585 added to function.jdtojewish

From: Date: Mon, 04 Mar 2002 21:04:03 +0000
Subject: note 19585 added to function.jdtojewish
Groups: php.notes 
Request: Send a blank email to php-notes+get-27329@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); $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 http://master.php.net/manage/user-notes.php?action=edit+19585 http://master.php.net/manage/user-notes.php?action=delete+19585 http://master.php.net/manage/user-notes.php?action=reject+19585

« previous php.notes (#27329) next »