mirror of
https://github.com/php/php-src.git
synced 2024-11-25 19:05:31 +08:00
40 lines
867 B
PHP
40 lines
867 B
PHP
--TEST--
|
|
IntlCalendar::clear() basic test
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('intl'))
|
|
die('skip intl extension not enabled');
|
|
--FILE--
|
|
<?php
|
|
ini_set("intl.error_level", E_WARNING);
|
|
ini_set("intl.default_locale", "nl");
|
|
|
|
$intlcal = IntlCalendar::createInstance('UTC');
|
|
var_dump($intlcal->clear());
|
|
var_dump(
|
|
$intlcal->get(IntlCalendar::FIELD_YEAR),
|
|
$intlcal->get(IntlCalendar::FIELD_MONTH),
|
|
$intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH),
|
|
$intlcal->get(IntlCalendar::FIELD_HOUR),
|
|
$intlcal->get(IntlCalendar::FIELD_MINUTE),
|
|
$intlcal->get(IntlCalendar::FIELD_SECOND),
|
|
$intlcal->get(IntlCalendar::FIELD_MILLISECOND)
|
|
);
|
|
|
|
$intlcal2 = IntlCalendar::createInstance('Europe/Amsterdam');
|
|
intlcal_clear($intlcal2, null);
|
|
var_dump($intlcal2->getTime());
|
|
|
|
?>
|
|
==DONE==
|
|
--EXPECT--
|
|
bool(true)
|
|
int(1970)
|
|
int(0)
|
|
int(1)
|
|
int(0)
|
|
int(0)
|
|
int(0)
|
|
int(0)
|
|
float(-3600000)
|
|
==DONE==
|