IntlDateFormatter
日本語版PHP マニュアルトップへ 英語版PHP Manualトップへ

IntlDateFormatter::getCalendar

datefmt_get_calendar

(No version information available, might be only in CVS)

datefmt_get_calendar ? IntlDateFormatter が使用するカレンダーを取得する

説明

オブジェクト指向型

integer IntlDateFormatter::getCalendar ( void )

手続き型

integer datefmt_get_calendar ( IntlDateFormatter $fmt )

パラメータ

fmt

Formatter リソース。

返り値

Formatter が使用するカレンダーを返します。

例1 datefmt_get_calendar() の例

<?php
$fmt 
datefmt_create(  "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN  );
echo 
"calendar of the formatter is : ".datefmt_get_calendar($fmt);
datefmt_set_calendar($fmt,IntlDateFormatter::TRADITIONAL);
echo 
"Now calendar of the formatter is : ".datefmt_get_calendar($fmt);
?>

例2 オブジェクト指向の例

<?php
$fmt 
= new IntlDateFormatter"en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN  );
echo 
"calendar of the formatter is : ".$fmt->getCalendar();
$fmt->setCalendar(IntlDateFormatter::TRADITIONAL);
echo 
"Now calendar of the formatter is : ".$fmt->getCalendar();

?>

上の例の出力は以下となります。

         
calendar of the formatter is : 1
Now calendar of the formatter is : 0

参考

PHPメニュー

スポンサー

人材派遣・アルバイト

日本全国の人材派遣会社とアルバイト紹介サイトを集めたディレクトリです。派遣やアルバイトをお探しの方はご参考に。

会社設立

株式会社の設立や電子定款公証を専門とする方の紹介サイト。

風俗営業許可(バー・キャバクラ等)

バーやキャバレー、クラブやスナック、パチンコ店やダーツバー等を始める場合に必要な風俗営業許可を専門に扱うサイトです。

産業廃棄物収集運搬業許可

産業廃棄物を取扱う事業の中でも収集運搬を専門に許可取得代行を行う専門家を紹介するサイトです。建築関係で事業拡大を図りたい場合にご覧下さい。

NPO法人設立・助成金

NPO法人の設立や運営、助成金の申請を専門にするプロ集団です。


IntlDateFormatter
日本語版PHP マニュアルトップへ 英語版PHP Manualトップへ