diff options
Diffstat (limited to 'ext/intl/tests/gregoriancalendar___construct_variant1.phpt')
-rw-r--r-- | ext/intl/tests/gregoriancalendar___construct_variant1.phpt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/ext/intl/tests/gregoriancalendar___construct_variant1.phpt b/ext/intl/tests/gregoriancalendar___construct_variant1.phpt new file mode 100644 index 0000000000..63266b792e --- /dev/null +++ b/ext/intl/tests/gregoriancalendar___construct_variant1.phpt @@ -0,0 +1,30 @@ +--TEST-- +IntlGregorianCalendar::__construct(): argument variants +--SKIPIF-- +<?php +if (!extension_loaded('intl')) + die('skip intl extension not enabled'); +--FILE-- +<?php +ini_set("intl.error_level", E_WARNING); + +date_default_timezone_set('Europe/Amsterdam'); + +$intlcal = intlgregcal_create_instance(2012, 1, 29, 16, 0, NULL); +var_dump($intlcal->getTimeZone()->getId()); +var_dump($intlcal->getTime(), (float)strtotime('2012-02-29 16:00:00') * 1000); + +$intlcal = new IntlGregorianCalendar(2012, 1, 29, 16, 7, 8); +var_dump($intlcal->getTime(), (float)strtotime('2012-02-29 16:07:08') * 1000); + +var_dump($intlcal->getType()); +?> +==DONE== +--EXPECT-- +string(16) "Europe/Amsterdam" +float(1330527600000) +float(1330527600000) +float(1330528028000) +float(1330528028000) +string(9) "gregorian" +==DONE== |