calendar_inDaylightTime_basic.phpt 574 B

123456789101112131415161718192021222324
  1. --TEST--
  2. IntlCalendar::inDaylightTime() 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('Europe/Amsterdam');
  14. $intlcal->setTime(strtotime('2012-01-01') * 1000);
  15. var_dump($intlcal->inDaylightTime());
  16. $intlcal->setTime(strtotime('2012-04-01') * 1000);
  17. var_dump(intlcal_in_daylight_time($intlcal));
  18. ?>
  19. ==DONE==
  20. --EXPECT--
  21. bool(false)
  22. bool(true)
  23. ==DONE==