Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

dd/mm/yyy not mm/dd/yyy


Ian-San

Recommended Posts

Or making the store UK specific:

 

Change some bits in english.php to look like this:

 

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 strftime()

define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

 

////

// Return date in raw format

// $date should be in format mm/dd/yyyy

// raw date is in format YYYYMMDD, or DDMMYYYY

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);

}

}

 

// if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)

define('LANGUAGE_CURRENCY', 'GBP');

 

// Global entries for the <html> tag

define('HTML_PARAMS','dir="LTR" lang="en"');

 

// charset for web pages and emails

define('CHARSET', 'iso-8859-1');

 

 

and

 

define('JS_DOB', '* The 'Date of Birth' entry must be in the format: xx/xx/xxxx (day/month/year).n');

 

define('ENTRY_DATE_OF_BIRTH_ERROR', ' <small><font color="#FF0000">(eg. 21/05/1970)</font></small>');

 

define('ENTRY_DATE_OF_BIRTH_TEXT', ' <small>(eg. 21/05/1970) <font color="#AABBDD">required</font></small>');

 

Then set up your GBP currencies using Admin.

Ian-san

Flawlessnet

Link to comment
Share on other sites

Not forgetting:

 

// text for date of birth example

define('DOB_FORMAT_STRING', 'dd/mm/yyyy');

 

John

 

Ooops! Lazy me .. :oops:

 

I cut this from an earlier post of mine without checking it... thanks.

Ian-san

Flawlessnet

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...