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