function isPastDate($date) { if (!($date = getSanitizedDate($date))) { throw new \InvalidArgumentException(sprintf('$date argument [%s] does not match correct format [%s]', $date, DATE_REGEX)); } if (getRemainingDays($date) < 0) { return true; } return false; }
public static function getSanitizedDate($date) { return getSanitizedDate($date); }