| ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot |
IntlCalendar::clear(PHP 5.5.0, PHP 7, PECL >= 3.0.0a1) IntlCalendar::clear — Clear a field or all fields 説明オブジェクト指向型
public bool IntlCalendar::clear
([ int
$field = NULL
] )手続き型 Clears either all of the fields or a specific field. A cleared field is marked as unset, giving it the lowest priority against overlapping fields or even default values when calculating the time. Additionally, its value is set to 0, though given the field?s low priority, its value may have been internally set to another value by the time the field has finished been queried. パラメータ
返り値
Returns 例
例1 IntlCalendar::clear() examples
<?php 上の例の出力は以下となります。 After GregorianCalendar creation Array ( [0] => FIELD_ERA [1] => FIELD_YEAR [2] => FIELD_MONTH [3] => FIELD_DATE ) 15/03/2013 00:00:00 After the formatter requested the extended year Array ( [0] => FIELD_ERA [1] => FIELD_YEAR [2] => FIELD_MONTH [3] => FIELD_DATE [4] => FIELD_EXTENDED_YEAR ) After the year has been cleared, the date stays the same 15/03/2013 00:00:00 because FIELD_EXTENDED_YEAR is still set Array ( [0] => FIELD_ERA [1] => FIELD_MONTH [2] => FIELD_DATE [3] => FIELD_EXTENDED_YEAR ) bool(true) After the extended year has been cleared Array ( [0] => FIELD_ERA [1] => FIELD_MONTH [2] => FIELD_DATE ) 15/03/1970 00:00:00 After the fields are recalculated, extended year is set again (to 1970) Array ( [0] => FIELD_ERA [1] => FIELD_MONTH [2] => FIELD_DATE [3] => FIELD_EXTENDED_YEAR ) After calling variant with no arguments Array ( ) 01/01/1970 00:00:00 |
各種マニュアル:
PHPマニュアル |
PEARマニュアル |
Smarty(英語)マニュアル |
PHP-GTKマニュアル |
「IntlCalendar::clear - Clear a field or all fields」をGoogle検索
|