Internationalization IntlCalendar::getRepeatedWallTimeOption

IntlCalendar::getRepeatedWallTimeOption

(PHP 5 >= 5.5.0, PHP 7, PHP 8, PECL >= 3.0.0a1)

IntlCalendar::getRepeatedWallTimeOption — 반복되는 벽 시간을 처리하기 위한 동작 가져오기


설명

객체 지향 스타일

public IntlCalendar::getRepeatedWallTimeOption(): int

절차적 스타일

intlcal_get_repeated_wall_time_option(IntlCalendar $calendar): int

일광 절약 시간 종료 전환 동안 시계가 다시 설정될 때마다 반복되는 실제 시간을 처리하기 위한 현재 전략을 가져옵니다. 기본값은 IntlCalendar::WALLTIME_LAST입니다.

이 함수를 사용하려면 ICU 4.9 이상이 필요합니다.


매개변수

calendar
IntlCalendar 인스턴스입니다.

반환 값

상수 IntlCalendar::WALLTIME_FIRST 또는 IntlCalendar::WALLTIME_LAST 중 하나입니다.


Examples

예제 #1 IntlCalendar::getRepeatedWallTimeOption()

                  
<?php
ini_set('date.timezone', 'Europe/Lisbon');
ini_set('intl.default_locale', 'en_US');
ini_set('intl.error_level', E_WARNING);

//On October 27th at 0200, the clock goes back 1 hour and from GMT+01 to GMT+00
$cal = new IntlGregorianCalendar(2013, 9 /* October */, 27, 1, 30);

var_dump($cal->getRepeatedWalltimeOption()); // 0 WALLTIME_LAST

$formatter = IntlDateFormatter::create(
    NULL,
    IntlDateFormatter::FULL,
    IntlDateFormatter::FULL,
    'UTC'
);
var_dump($formatter->format($cal->getTime() / 1000.));

$cal->setRepeatedWalltimeOption(IntlCalendar::WALLTIME_FIRST);
var_dump($cal->getRepeatedWalltimeOption()); // 1 WALLTIME_FIRST
$cal->set(IntlCalendar::FIELD_HOUR_OF_DAY, 1);

var_dump($formatter->format($cal->getTime() / 1000.));
                  
                

위의 예는 다음을 출력합니다.

int(0)
string(42) "Sunday, October 27, 2013 at 1:30:00 AM GMT"
int(1)
string(43) "Sunday, October 27, 2013 at 12:30:00 AM GMT"
                

기타