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--EXPECTF--
25Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d
26bool(true)
27int(1)
28int(1)
29
30Deprecated: Calling IntlGregorianCalendar::__construct() with more than 2 arguments is deprecated, use either IntlGregorianCalendar::createFromDate() or IntlGregorianCalendar::createFromDateTime() instead in %s on line %d
31bool(true)
32int(1)
33int(1)
34