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: Fri, 05 Sep 2008

view this page in

jdtojewish

(PHP 4, PHP 5)

jdtojewishConvertit le nombre de jours du calendrier Julien en date du calendrier juif

Description

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

Convertit le nombre de jours du calendrier Julien en date du calendrier juif.

Les paramètres optionnels hebrew et fl sont disponibles depuis PHP 5.0.0.

Si le paramètre hebrew vaut TRUE, le paramètre fl sera utilisé pour générer une chaîne au format hébreux. Les formats disponibles sont : CAL_JEWISH_ADD_ALAFIM_GERESH, CAL_JEWISH_ADD_ALAFIM et CAL_JEWISH_ADD_GERESHAYIM.

Liste de paramètres

julianday

Le nombre de jours Julien, sous la forme d'un entier

Valeurs de retour

La date Juive, sous la forme d'une chaîne de caractères "mois/jour/année".

Historique

Version Description
5.0.0 Les paramètres hebrew et fl ont été ajoutés.

Exemples

Exemple #1 Exemple avec jdtojewish()

<?php
echo jdtojewish(gregoriantojd(1082002), true,
       
CAL_JEWISH_ADD_GERESHAYIM CAL_JEWISH_ADD_ALAFIM CAL_JEWISH_ADD_ALAFIM_GERESH); 
?>



JDToJulian> <JDToGregorian
Last updated: Fri, 05 Sep 2008
 
add a note add a note User Contributed Notes
jdtojewish
asphp at dsgml dot com
28-May-2007 11: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 08: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
05-Mar-2002 01: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: Fri, 05 Sep 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites