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