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