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

search for in the

IntlDateFormatter::getCalendarObject> <IntlDateFormatter::getTimeType
[edit] Last updated: Fri, 24 May 2013

view this page in

IntlDateFormatter::getTimeZoneId

datefmt_get_timezone_id

(PHP 5 >= 5.3.0, PECL intl >= 1.0.0)

IntlDateFormatter::getTimeZoneId -- datefmt_get_timezone_idIntlDateFormatter が使用するタイムゾーン ID を取得する

説明

オブジェクト指向型

string IntlDateFormatter::getTimeZoneId ( void )

手続き型

string datefmt_get_timezone_id ( IntlDateFormatter $fmt )

IntlDateFormatter が使用するタイムゾーン ID を取得します。

パラメータ

fmt

Formatter リソース。

返り値

この Formatter が使用するタイムゾーンの ID 文字列を返します。

例1 datefmt_get_timezone_id() の例

<?php
$fmt 
datefmt_create(  "en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN  );
echo 
"timezone_id of the formatter is : ".datefmt_get_timezone_id($fmt);
datefmt_set_timezone_id($fmt,'CN');
echo 
"Now timezone_id of the formatter is : ".datefmt_get_timezone_id($fmt);

?>

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

<?php
$fmt 
= new IntlDateFormatter"en_US" ,IntlDateFormatter::FULL,IntlDateFormatter::FULL,'America/Los_Angeles',IntlDateFormatter::GREGORIAN  );
echo 
"timezone_id of the formatter is : ".$fmt->getTimezoneId();
$fmt->setTimezoneId('CN');
echo 
"Now timezone_id of the formatter is : ".$fmt->getTimezoneId();

?>

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

timezone_id of the formatter is : America/Los_Angeles
Now timezone_id of the formatter is : CN

参考



add a note add a note User Contributed Notes IntlDateFormatter::getTimeZoneId - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites