1--TEST--
2IntlCalendar::roll() basic test
3--INI--
4date.timezone=Atlantic/Azores
5--EXTENSIONS--
6intl
7--FILE--
8<?php
9ini_set("intl.error_level", E_WARNING);
10ini_set("intl.default_locale", "nl");
11
12$intlcal = new IntlGregorianCalendar(2012, 1, 28);
13var_dump($intlcal->roll(IntlCalendar::FIELD_DAY_OF_MONTH, 2));
14var_dump($intlcal->get(IntlCalendar::FIELD_MONTH)); //1 (Feb)
15var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH)); //1
16
17$intlcal = new IntlGregorianCalendar(2012, 1, 28);
18var_dump(intlcal_roll($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH, 2));
19var_dump($intlcal->get(IntlCalendar::FIELD_MONTH)); //1 (Feb)
20var_dump($intlcal->get(IntlCalendar::FIELD_DAY_OF_MONTH)); //1
21
22
23?>
24--EXPECT--
25bool(true)
26int(1)
27int(1)
28bool(true)
29int(1)
30int(1)
30