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>');
 
changing_style_of_date_to_english_formatted.txt · Last modified: 2008/04/10 21:25 by michael_s
osCMax Hosting
Your business deserves more than the cheapest hosting you can find.
Dedicated Servers
Need a server tuned for ecommerce, speed and security?
Domain Registration
Only $9.99 a year from a company you trust
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki