calendar_isWeekend_basic.phpt 700 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. IntlCalendar::isWeekend 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. if (version_compare(INTL_ICU_VERSION, '4.4') < 0)
  10. die('skip for ICU 4.4+');
  11. --FILE--
  12. <?php
  13. ini_set("intl.error_level", E_WARNING);
  14. ini_set("intl.default_locale", "nl");
  15. $intlcal = IntlCalendar::createInstance('UTC');
  16. var_dump($intlcal->isWeekend(strtotime('2012-02-29 12:00:00 +0000') * 1000));
  17. var_dump(intlcal_is_weekend($intlcal, strtotime('2012-02-29 12:00:00 +0000') * 1000));
  18. var_dump($intlcal->isWeekend(strtotime('2012-03-11 12:00:00 +0000') * 1000));
  19. ?>
  20. ==DONE==
  21. --EXPECT--
  22. bool(false)
  23. bool(false)
  24. bool(true)
  25. ==DONE==