class StupidDotDateFormat
{
var $mStupidDotDateFormat = '';
var $mSimpleDateFormat = '';
function ChangeDotedDateStringToSimpleDateFormat ($stupidDotDateFormat)
{
$this->mStupidDotDateFormat = $stupidDotDateFormat;
list($day, $month, $year) = split ('[/.\.]', $this->mStupidDotDateFormat);
if (checkdate ((int)$month, (int)$day, (int)$year ))
{
$this->mSimpleDateFormat = $year . '-' . $month . '-' . $day;
} else
{
die('Плохая дата! Плохая!');
}
}
}
$foo = &new StupidDotDateFormat();
$foo->ChangeDotedDateStringToSimpleDateFormat ('20.09.2003');
echo strtotime($foo->mSimpleDateFormat);