calendar_getXMaximum_basic.phpt 918 B

12345678910111213141516171819202122232425262728293031323334
  1. --TEST--
  2. IntlCalendar::getMaximum(), ::getActualMaximum(), ::getLeastMaximum() 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->setTime(strtotime('2012-02-29 05:06:07 +0000') * 1000);
  15. var_dump(
  16. $intlcal->getLeastMaximum(IntlCalendar::FIELD_DAY_OF_MONTH),
  17. intlcal_get_least_maximum($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH),
  18. $intlcal->getActualMaximum(IntlCalendar::FIELD_DAY_OF_MONTH),
  19. intlcal_get_actual_maximum($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH),
  20. $intlcal->getMaximum(IntlCalendar::FIELD_DAY_OF_MONTH),
  21. intlcal_get_maximum($intlcal, IntlCalendar::FIELD_DAY_OF_MONTH)
  22. );
  23. ?>
  24. ==DONE==
  25. --EXPECT--
  26. int(28)
  27. int(28)
  28. int(29)
  29. int(29)
  30. int(31)
  31. int(31)
  32. ==DONE==