Task #272: Trying to fix a reported in a private message Fatal error: Class 'IntlDateFormatter' not found in C:\xampp\htdocs\chamilo\main\inc\lib\internationalization.lib.php on line 570

skala
Ivan Tcholakov 15 years ago
parent 6556a759bd
commit 88ecb24897
  1. 10
      main/inc/lib/internationalization.lib.php

@ -566,35 +566,35 @@ function api_format_date($time, $format = null, $language = null) {
switch ($format) {
case TIME_NO_SEC_FORMAT:
$date_format = get_lang('timeNoSecFormat', '', $language);
if (IS_PHP_53) {
if (IS_PHP_53 && INTL_INSTALLED) {
$datetype = IntlDateFormatter::NONE;
$timetype = IntlDateFormatter::SHORT;
}
break;
case DATE_FORMAT_SHORT:
$date_format = get_lang('dateFormatShort', '', $language);
if (IS_PHP_53) {
if (IS_PHP_53 && INTL_INSTALLED) {
$datetype = IntlDateFormatter::LONG;
$timetype = IntlDateFormatter::NONE;
}
break;
case DATE_FORMAT_LONG:
$date_format = get_lang('dateFormatLong', '', $language);
if (IS_PHP_53) {
if (IS_PHP_53 && INTL_INSTALLED) {
$datetype = IntlDateFormatter::FULL;
$timetype = IntlDateFormatter::NONE;
}
break;
case DATE_TIME_FORMAT_LONG:
$date_format = get_lang('dateTimeFormatLong', '', $language);
if (IS_PHP_53) {
if (IS_PHP_53 && INTL_INSTALLED) {
$datetype = IntlDateFormatter::FULL;
$timetype = IntlDateFormatter::SHORT;
}
break;
default:
$date_format = get_lang('dateTimeFormatLong', '', $language);
if (IS_PHP_53) {
if (IS_PHP_53 && INTL_INSTALLED) {
$datetype = IntlDateFormatter::FULL;
$timetype = IntlDateFormatter::SHORT;
}

Loading…
Cancel
Save