|
|
|
|
@ -31,6 +31,9 @@ define('DATE_TIME_FORMAT_LONG', 3); // August 25, 2009 at 03:28 PM |
|
|
|
|
define('DATE_FORMAT_NUMBER', 4); // 25.08.09 |
|
|
|
|
define('DATE_TIME_FORMAT_LONG_24H', 5); // August 25, 2009 at 15:28 |
|
|
|
|
|
|
|
|
|
define('DATE_TIME_FORMAT_SHORT', 6); // Aug 25, 2009 at 03:28 PM |
|
|
|
|
define('DATE_TIME_FORMAT_SHORT_TIME_FIRST', 7); // 03:28 PM, Aug 25 2009 |
|
|
|
|
|
|
|
|
|
// Formatting person's name. |
|
|
|
|
define('PERSON_NAME_COMMON_CONVENTION', 0); // Formatting a person's name using the pattern as it has been |
|
|
|
|
// configured in the internationalization database for every language. |
|
|
|
|
@ -713,6 +716,20 @@ function api_format_date($time, $format = null, $language = null) { |
|
|
|
|
$datetype = IntlDateFormatter::FULL; |
|
|
|
|
$timetype = IntlDateFormatter::SHORT; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case DATE_TIME_FORMAT_SHORT: |
|
|
|
|
$date_format = get_lang('dateTimeFormatShort', '', $language); |
|
|
|
|
if (IS_PHP_53 && INTL_INSTALLED) { |
|
|
|
|
$datetype = IntlDateFormatter::FULL; |
|
|
|
|
$timetype = IntlDateFormatter::SHORT; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case DATE_TIME_FORMAT_SHORT_TIME_FIRST: |
|
|
|
|
$date_format = get_lang('dateTimeFormatShortTimeFirst', '', $language); |
|
|
|
|
if (IS_PHP_53 && INTL_INSTALLED) { |
|
|
|
|
$datetype = IntlDateFormatter::FULL; |
|
|
|
|
$timetype = IntlDateFormatter::SHORT; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case DATE_TIME_FORMAT_LONG_24H: |
|
|
|
|
$date_format = get_lang('dateTimeFormatLong24H', '', $language); |
|
|
|
|
|