Date and time management - got rid of DATE_FORMAT_LONG_WITHOUT_DAY - Chamilo - CT#696

skala
Guillaume Viguier 15 years ago
parent f4c7015a3a
commit 4ba627cba5
  1. 2
      main/announcements/announcements.php
  2. 6
      main/inc/lib/internationalization.lib.php

@ -1407,7 +1407,7 @@ if ($display_announcement_list && !$surveyid) {
echo '   '.get_lang('By').' :  '.str_replace(' ', ' ', api_get_person_name($user_info['firstName'], $user_info['lastName']));
echo "\t\t\t\t\t</th>\n","\t\t\t\t</tr>\n";
echo "\t\t\t\t<tr class='row_odd'>\n\t\t\t\t\t<td class=\"announcements_datum\" colspan=\"3\">";
echo get_lang('AnnouncementPublishedOn')," : ",api_ucfirst(api_convert_and_format_date($last_post_datetime, null, date_default_timezone_get()));
echo get_lang('AnnouncementPublishedOn')," : ",api_ucfirst(api_convert_and_format_date($last_post_datetime, DATE_FORMAT_LONG, date_default_timezone_get()));
echo "</td>\n\t\t\t\t</tr>\n";
/* CONTENT */

@ -22,7 +22,6 @@ define('TIME_NO_SEC_FORMAT', 0); // 15:23
define('DATE_FORMAT_SHORT', 1); // 25.08.2009
define('DATE_FORMAT_LONG', 2); // Aug 25, 09
define('DATE_TIME_FORMAT_LONG', 3); // August 25, 2009 at 03:28 PM
define('DATE_FORMAT_LONG_WITHOUT_DAY', 4);
// Formatting person's name.
define('PERSON_NAME_COMMON_CONVENTION', 0); // Formatting a person's name using the pattern as it has been
@ -522,7 +521,7 @@ function api_strtotime($time, $timezone = null) {
* @author Guillaume Viguier <guillaume.viguier@beeznest.com>
*
* @param mixed Timestamp or datetime string
* @param mixed Date format (string or int; see date formats in the Chamilo system: TIME_NO_SEC_FORMAT, DATE_FORMAT_SHORT, DATE_FORMAT_LONG, DATE_TIME_FORMAT_LONG, DATE_FORMAT_LONG_WITHOUT_DAY)
* @param mixed Date format (string or int; see date formats in the Chamilo system: TIME_NO_SEC_FORMAT, DATE_FORMAT_SHORT, DATE_FORMAT_LONG, DATE_TIME_FORMAT_LONG)
* @param string $language (optional) Language indentificator. If it is omited, the current interface language is assumed.
* @return string Returns the formatted date.
*
@ -573,9 +572,6 @@ function api_format_date($time, $format = null, $language = null) {
$timetype = IntlDateFormatter::SHORT;
}
break;
case DATE_FORMAT_LONG_WITHOUT_DAY:
$date_format = get_lang('DateFormatLongWithoutDay', '', $language);
break;
default:
$date_format = get_lang('dateTimeFormatLong', '', $language);
if (IS_PHP_53) {

Loading…
Cancel
Save