calendar_getTime_basic.phpt 662 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. IntlCalendar::getTime() basic test
  3. --INI--
  4. date.timezone=Atlantic/Azores
  5. --SKIPIF--
  6. <?php
  7. if (!extension_loaded('intl'))
  8. die('skip intl extension not enabled');
  9. --FILE--
  10. <?php
  11. ini_set("intl.error_level", E_WARNING);
  12. ini_set("intl.default_locale", "nl");
  13. $intlcal = IntlCalendar::createInstance('UTC');
  14. $intlcal->clear();
  15. $intlcal->set(IntlCalendar::FIELD_YEAR, 2012);
  16. $intlcal->set(IntlCalendar::FIELD_MONTH, 1 /* Feb */);
  17. $intlcal->set(IntlCalendar::FIELD_DAY_OF_MONTH, 29);
  18. $time = strtotime('2012-02-29 00:00:00 +0000');
  19. var_dump((float)$time*1000, $intlcal->getTime());
  20. ?>
  21. ==DONE==
  22. --EXPECT--
  23. float(1330473600000)
  24. float(1330473600000)
  25. ==DONE==