function($d) { if ( !Str::isNumber($d) ){ $d = strtotime($d); } if ( ($d > 0) && Str::isNumber($d) ){ return (float)$d; } return null; }