I want our date format to be dd/mm/yyyy
I am using an "addon" which allow me to upload customers I already have, but the add-on was written for USA ie mm/dd/yyyy. I have already made changes to the ../english.php file to allow my format to be dd/mm/yyyy on my site.
But when I use the add-on it doesn't work because of the code below:
PHP Code:
if (ACCOUNT_DOB == 'true') {
if (ENTRY_DOB_MIN_LENGTH >0 && strlen($customers_dob) > 0) {
$customers_dob = str_replace('-','',$customers_dob);
$customers_dob = str_replace('/','',$customers_dob);
$month = (int)substr($customers_dob, 4, 2);
$day = (int)substr($customers_dob, 6, 2);
$year = (int)substr($customers_dob, 0, 4);
if (!checkdate($month, $day, $year)) {
$errors[] = 'DOB is invalid (Must be YYYYMMDD, YYYY/MM/DD or YYYY-MM-DD)';
}
} else {
$customers_dob = '0001-01-01 00:00:00';
}
}
How can I modify this to allow the format to be dd/mm/yyy? I'm sure it has something to do with the "6" and "4" after $custromers_dob
Thanks heaps in advance for any assistance or any ideas at all, I have spend days trying different method, just can't seen to figure it out?
Bookmarks