- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$tests = array(
'2012-12-04',
'12/04/2012',
'12/13/2012',
'13/12/2012',
'04/12/2012'
);
foreach($tests as $test){
$ts = strtotime($test);
echo "$test : $ts : ".date('Y-m-d', $ts)." \n";
}