Forum Moderators: coopster
The user passes a date string in UK date format, ie. '18/11/1986'. This then needs to be converted into a unix timestamp. I was wondering if there was any way that PHP could be configured to see a date string as being in 'd/m/Y' order by default (or any other particular format for that matter)?
I guess not (so far), so I've resorted to doing something like what is mentioned in the Bag-O-Tricks for PHP III [webmasterworld.com] thread:
$ukdate = '18/11/1986;
list($day, $month, $year) = explode('/', $ukdate);
$usdate = $month.'/'.$day.'/'.$year;
$unixdate = strtotime($usdate);