Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Wrong date of birth format in login screen.


Marco from Holland

Recommended Posts

Hi,

 

The date of birth format in my login screen has the wrong format.

 

It's mm/dd/yyyy, while it should be dd/mm/yyyy.

The example format is also in the latter, and the login only works if the first one is entered.

 

Should I make the change in the right language file? (In my case dutch.php)

And what should I change?

 

 

Thnks,

 

Marco

Link to comment
Share on other sites

Is it critical that you use the Date of Birth.

 

It was causing me problems, but I did not relly need it so I disabled it in the Customer Details section of admin.

 

Sorry I can't be of better help

Link to comment
Share on other sites

Hi

 

This is the mods I did to my code, english.php from an early thread

it works for english. ;)

 

I commented out the original code, makes it easier to undo

 

setlocale(LC_TIME, 'en_US.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('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');

 

////

// Return date in raw format

// $date should be in format dd/mm/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);

}

}

//Section moded

//define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime()

//define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()

//define('DATE_FORMAT', 'm/d/Y'); // this is used for date()

//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, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);

// } else {

// return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);

// }

//}

 

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

// text for date of birth example

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

 

 

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

 

 

Hope it helps

Cheers

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...