1--TEST--
2IntlGregorianCalendar::__construct(): basic
3--EXTENSIONS--
4intl
5--FILE--
6<?php
7ini_set("intl.error_level", E_WARNING);
8ini_set("intl.default_locale", "nl");
9
10date_default_timezone_set('Europe/Amsterdam');
11
12$intlcal = intlgregcal_create_instance();
13var_dump($intlcal->getTimeZone()->getId());
14var_dump($intlcal->getLocale(1));
15
16$intlcal = new IntlGregorianCalendar('Europe/Lisbon', NULL);
17var_dump($intlcal->getTimeZone()->getId());
18var_dump($intlcal->getLocale(1));
19
20$intlcal = new IntlGregorianCalendar(NULL, 'pt_PT');
21var_dump($intlcal->getTimeZone()->getId());
22var_dump($intlcal->getLocale(1));
23
24$intlcal = new IntlGregorianCalendar('Europe/Lisbon', 'pt_PT');
25var_dump($intlcal->getTimeZone()->getId());
26var_dump($intlcal->getLocale(1));
27
28$intlcal = new IntlGregorianCalendar('Europe/Paris', 'fr_CA', NULL, NULL, NULL, NULL);
29var_dump($intlcal->getTimeZone()->getId());
30var_dump($intlcal->getLocale(1));
31
32var_dump($intlcal->getType());
33?>
34--EXPECT--
35string(16) "Europe/Amsterdam"
36string(5) "nl_NL"
37string(13) "Europe/Lisbon"
38string(5) "nl_NL"
39string(16) "Europe/Amsterdam"
40string(5) "pt_PT"
41string(13) "Europe/Lisbon"
42string(5) "pt_PT"
43string(12) "Europe/Paris"
44string(5) "fr_CA"
45string(9) "gregorian"
46