Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: jdtojewish - Manual
[go: Go Back, main page]

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

search for in the

JDToJulian" width="11" height="7"/> <JDToGregorian
Last updated: Thu, 31 May 2007

view this page in

jdtojewish

(PHP 4, PHP 5)

jdtojewish — ユリウス積算日をユダヤ暦に変換する

説明

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

ユリウス積算日をユダヤ暦に変換します。

オプションのパラメータ hebrew および fl は PHP 5.0.0 以降で使用可能となりました。

パラメータ hebrewTRUE に設定されている場合、 ヘブライ語の文字列形式での出力のために fl が使用されます。使用可能なフォーマットは以下のとおりです。 CAL_JEWISH_ADD_ALAFIM_GERESHCAL_JEWISH_ADD_ALAFIMCAL_JEWISH_ADD_GERESHAYIM

パラメータ

julianday

ユリウス積算日を表す整数値。

返り値

ユダヤ暦の日付を "月/日/年" 形式の文字列で返します。

例 362. jdtojewish() の例

<?php
echo jdtojewish(gregoriantojd(10, 8, 2002), true,
      
CAL_JEWISH_ADD_GERESHAYIM + CAL_JEWISH_ADD_ALAFIM + CAL_JEWISH_ADD_ALAFIM_GERESH);
?>

参考

jewishtojd()
cal_from_jd()



JDToJulian" width="11" height="7"/> <JDToGregorian
Last updated: Thu, 31 May 2007
 
add a note add a note User Contributed Notes
jdtojewish
asphp at dsgml dot com
29-May-2007 06:10
This function outputs in ISO-8859-8-l.

To convert to unicode UTF-8 do this:

<?

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

?>
gr8g0thamguy at yahoo dot com
02-Sep-2003 03: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 09: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...

<?

//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" width="11" height="7"/> <JDToGregorian
Last updated: Thu, 31 May 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites