1--TEST-- 2IntlCalendar::fieldDifference() 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 = IntlCalendar::createInstance('UTC'); 13$intlcal->setTime(strtotime('2012-02-29 05:06:07 +0000') * 1000); 14var_dump( 15 $intlcal->fieldDifference( 16 strtotime('2012-02-29 06:06:08 +0000') * 1000, 17 IntlCalendar::FIELD_SECOND), 18 $intlcal->get(IntlCalendar::FIELD_HOUR_OF_DAY)); 19 20 21$intlcal->setTime(strtotime('2012-02-29 05:06:07 +0000') * 1000); 22var_dump( 23 intlcal_field_difference( 24 $intlcal, 25 strtotime('2012-02-29 06:07:08 +0000') * 1000, 26 IntlCalendar::FIELD_MINUTE)); 27?> 28--EXPECT-- 29int(3601) 30int(6) 31int(61) 31