public function validateDate($creditCardExpiredMonth, $creditCardExpiredYear)
    {
        $currentYear = intval(date('Y'));
        $currentMonth = intval(date('m'));

        if (is_scalar($creditCardExpiredMonth)) {
            $creditCardExpiredMonth = intval($creditCardExpiredMonth);
        }
        if (is_scalar($creditCardExpiredYear)) {
            $creditCardExpiredYear = intval($creditCardExpiredYear);
        }

        return is_int($creditCardExpiredMonth) && is_int($creditCardExpiredYear) && $creditCardExpiredMonth <= 12
        && ($creditCardExpiredMonth >= 1 && $creditCardExpiredYear > $currentYear
            && $creditCardExpiredYear < $currentYear + 21) || ($creditCardExpiredYear == $currentYear && $creditCardExpiredMonth >= $currentMonth);
    }