|
Posted by Bruno B B Magalhγes on 07/08/05 03:54
Hi Folks,
Well I think I got it, at least it's working more or less to me now...
I really would appreciate any comments or suggestions.
function str2time($input = '12/31/1969')
{
if(($output = strtotime($input)) !== -1)
{
return $output;
}
else
{
preg_match('([0-2][0-9][0-9][0-9])', $input, $year);
preg_replace('([0-2][0-9][0-9][0-9])', '1976', $input);
return floor(strtotime($input) + (($year[0] - 1976) *
(31557376.189582)));
}
}
Thanks a lot!
Best Regards,
Bruno B B Magalhaes
Navigation:
[Reply to this message]
|