PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

JDToJulian> <JDToGregorian
Last updated: Sat, 24 Mar 2007

view this page in

JDToJewish

(PHP 4, PHP 5)

JDToJewish — Převést Julian Day Count na idovský kalendář

Popis

string jdtojewish ( int $juliandaycount [, bool $hebrew [, int $fl]] )

Převádí Julian Day Count na idovský kalendář.



JDToJulian> <JDToGregorian
Last updated: Sat, 24 Mar 2007
 
add a note add a note User Contributed Notes
JDToJewish
asphp at dsgml dot com
28-May-2007 02:10
This function outputs in ISO-8859-8-l.

To convert to unicode UTF-8 do this:

<?php

echo mb_convert_encoding( jdtojewish( unixtojd(), true ), "UTF-8", "ISO-8859-8");

?>
gr8g0thamguy at yahoo dot com
01-Sep-2003 11:39
Based on the code already posted by Dave, I've modified it to display the *current* date on a page:

<?php

$gregorianMonth
= date(n);
$gregorianDay = date(j);
$gregorianYear = date(Y);

$jdDate = gregoriantojd($gregorianMonth,$gregorianDay,$gregorianYear);

$hebrewMonthName = jdmonthname($jdDate,4);

$hebrewDate = jdtojewish($jdDate);

list(
$hebrewMonth, $hebrewDay, $hebrewYear) = split('/',$hebrewDate);

echo
"$hebrewDay $hebrewMonthName $hebrewYear";
?>
dave_at_mitzvahweb.com
04-Mar-2002 04:04
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...

<?php

//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";

?>

JDToJulian> <JDToGregorian
Last updated: Sat, 24 Mar 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites