Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.

This will change the style of date from DDMMYYYY to MMDDYYYY

The date formats are defined in /catalog/includes/languages/english.php

Open english.php for editing and search for : DOB_FORMAT_STRING, JS_DOB, ENTRY_DATE_OF_BIRTH_ERROR, DATE_FORMAT_SHORT, DATE_FORMAT_LONG, DATE_FORMAT

and change:

setlocale(LC_TIME, 'en_US.ISO_8859-1');
to:
setlocale(LC_TIME, 'en_GB.ISO_8859-1');

Edit the following as well in the same file:

setlocale(LC_TIME, 'en_GB.ISO_8859-1');
define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime()
define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()
define('DATE_FORMAT', 'd/m/Y'); // this is used for date()
define('PHP_DATE_TIME_FORMAT', 'd/m/Y H:i:s'); // this is used for date()
function tep_date_raw($date, $reverse = false) {
if ($reverse) {
return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);
} else {
return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);
}
}
 
define('DOB_FORMAT_STRING', 'dd/mm/yyyy');
 
define('ENTRY_DATE_OF_BIRTH_ERROR', '&nbsp;<span class="errorText">(eg. 21/05/1970)</span>');

  • Bookmark at
  • Bookmark "changing_style_of_date_to_english_formatted" at Reddit
  • Bookmark "changing_style_of_date_to_english_formatted" at Google
  • Bookmark "changing_style_of_date_to_english_formatted" at Facebook
  • Bookmark "changing_style_of_date_to_english_formatted" at Twitter
  • Bookmark "changing_style_of_date_to_english_formatted" at Slashdot
changing_style_of_date_to_english_formatted.txt ยท Last modified: 2008/04/10 20:25 (external edit)
You are here: startchanging_style_of_date_to_english_formatted
Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0