createFromFormat(self::$inputConfig['date_format'], self::$inputValue); $timestamp = 0; if ($date_format instanceof \DateTime) { $timestamp = $date_format->getTimestamp(); } $dateParams = getdate((int)$timestamp); if (checkdate($dateParams['mon'], $dateParams['mday'], $dateParams['year'])) { switch (self::$inputConfig['type']) { case "timestamp": return $timestamp; break; case "date": $date = (string)$dateParams['year']."-".$dateParams['mon']."-".$dateParams['mday']; return $date; break; } } else { \defender::stop(); \defender::setInputError(self::$inputName); addNotice('info', sprintf($locale['df_404'], self::$inputConfig['title'])); } } return (string)self::$inputDefault; } }