public function __construct($strDate = null, $strFormat = null)
{
$this->strDate = $strDate !== null ? $strDate : time();
$this->strFormat = $strFormat !== null ? $strFormat : static::getNumericDateFormat();
if (!preg_match('/^-?[0-9]+$/', $this->strDate) || preg_match('/^[a-zA-Z]+$/', $this->strFormat)) {
$this->dateToUnix();
}
}