Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Short Date Format


marcoreixa

Recommended Posts

Posted

The short date format shows in first place the Month and then de Day: MM/DD/YYYY.

How can i change it to display the Day in first place: DD/MM/YYYY?

 

Best regards

 

MR

Posted

In includes/languages/english.php, around line 41, change the date code to the following

 

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

  • 2 weeks later...
Posted

Just a note to say you may also need to change the function tep_date_raw in the same languages file, as bellow to accept the persons DOB as dd/mm/yyyy format when the sign up:

 

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

Archived

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

×
×
  • Create New...