1--TEST--
2IntlCalendar::isEquivalentTo() basic test
3--SKIPIF--
4<?php
5if (!extension_loaded('intl'))
6    die('skip intl extension not enabled');
7--FILE--
8<?php
9ini_set("intl.error_level", E_WARNING);
10ini_set("intl.default_locale", "nl");
11
12$intlcal1 = IntlCalendar::createInstance('Europe/Amsterdam');
13$intlcal2 = IntlCalendar::createInstance('Europe/Lisbon');
14$intlcal3 = IntlCalendar::createInstance('Europe/Amsterdam', "nl_NL@calendar=islamic");
15$intlcal4 = IntlCalendar::createInstance('Europe/Amsterdam');
16$intlcal4->roll(IntlCalendar::FIELD_MONTH, true);
17
18var_dump(
19        "1 - 1",
20        $intlcal1->isEquivalentTo($intlcal1),
21        "1 - 2",
22        $intlcal1->isEquivalentTo($intlcal2),
23        "1 - 3",
24        $intlcal1->isEquivalentTo($intlcal3),
25        "1 - 4",
26        $intlcal1->isEquivalentTo($intlcal4)
27);
28
29?>
30--EXPECT--
31string(5) "1 - 1"
32bool(true)
33string(5) "1 - 2"
34bool(false)
35string(5) "1 - 3"
36bool(false)
37string(5) "1 - 4"
38bool(true)
38