Checks credit card expiration date. Returns TRUE if card is not expired

@param string $date credit card type

@return bool
197798
protected function _isExpired($date)
    {
        if ($date) {
            $years = substr($date, 2, 2);
            $month = substr($date, 0, 2);
            $day = date("t", mktime(11, 59, 59, $month, 1, $years));

            $expDate = mktime(23, 59, 59, $month, $day, $years);
            if (time() > $expDate) {
                return true;
            }
        }

        return false;
    }
995520
public function checkAfter($date, $earliest)
    {
        try {
            return $this->toTimestamp($date) > $this->toTimestamp($earliest);
        } catch (InvalidArgumentException $e) {
            return false;
        }
    }
273103
public static function date2sql($date)
    {
        $dt = new Datetime();
        
        return ($dt->set_date($date)) ? $dt->toSql() : false;
    }
1286015
public function usedVATOnDate($date)
    {
        $period = $this->getPeriod($date);

        return !is_null($period) && !empty($period->getStandardRate());
    }
523832
protected function isTomorrow(DateTime $date)
    {
        $tomorrow = new DateTime('+1 day');
        $start = new DateTime($tomorrow->format('Y-m-d') . ' 00:00:00');
        $end   = new DateTime($tomorrow->format('Y-m-d') . ' 23:59:59');

        if ($date->getTimestamp() >= $start->getTimestamp() && $date->getTimestamp() <= $end->getTimestamp()) {
            return true;
        }
        return false;
    }
121689
public function hasStatementForDate($date)
    {
        if (is_string($date)) {
            $date = new \DateTime($date);
        }

        return null !== $this->getStatementForDate($date);
    }
602713
public function isExpired() : bool
    {
        return $this->getExpiryAttribute()->timestamp < Carbon::now()->timestamp
            && $this->length !== 0
            && !$this->isRemoved();
    }
912958
function verifyExpiration() {
    if (opt.removeExpired === false) return;
    let now = Date.now();
    Object.keys(SESSION_STORE).forEach((id) => {
      let item = SESSION_STORE[id];
      if (!item) return;
      if (now < item.e) return;
      delete SESSION_STORE[id];
    });
  }
1044988
function revoke($serial, $date = null)
    {
        if (isset($this->currentCert['tbsCertList'])) {
            if (is_array($rclist = &$this->_subArray($this->currentCert, 'tbsCertList/revokedCertificates', true))) {
                if ($this->_revokedCertificate($rclist, $serial) === false) { // If not yet revoked
                    if (($i = $this->_revokedCertificate($rclist, $serial, true)) !== false) {
                        if (!empty($date)) {
                            $rclist[$i]['revocationDate'] = $this->_timeField($date);
                        }

                        return true;
                    }
                }
            }
        }

        return false;
    }
738170
public static function isValidDate($date)
    {
        $d = $this->splitDate($date, 'int');
        if ($d['year'] > 0 && $d['month'] > 0 && $d['date'] > 0) {
            return checkdate($d['month'], $d['date'], $d['year']);
        } else {
            return false;
        }
    }
882365
public function isExpired()
    {
        if (isset($this->_claims['exp']) && is_numeric($this->_claims['exp']))
        {
            $now  = new DateTime('now');
            return ($now->format('U') - $this->_claims['exp']) > 0;
        }

        return false;
    }
646610
protected function isValidDate($date)
    {
        $dt = DateTime::createFromFormat('Y-m-d', $date);

        return ($dt !== false && !array_sum($dt->getLastErrors()));
    }
308214
protected function uptimeInSeconds($date)
    {
        return
            (isset($date['up_days']) ? $date['up_days'] * 24 * 60 : 0) +
            (isset($date['up_hours']) ? $date['up_hours'] * 60 : 0) +
            (isset($date['up_minutes']) ? $date['up_minutes'] : 0);
    }
154329
public static function isDate($value) {
        if (!trim($value)) {
            return false;
        }

        if (trim($value) == '0000-00-00') {
            return false;
        }

        if (trim($value) == '0000-00-00 00:00:00') {
            return false;
        }

        return true;
    }
915609
protected function isExpired()
    {
        $exp = \DateTime::createFromFormat( 'U', $this->getClaimOrNull( self::EXPIRY ) );
        return !$exp || $exp <= ( new DateTime );
    }
831144
public  function isExpired(){
        $now = new DateTime(gmdate('Y-m-d H:i:s'));
        $expire = new Datetime($this->expiry_dtime);
        return $now >= $expire;
    }
1204142
private function isValidDate(string $date, string $format = 'Y-m-d') : bool
    {
        $d = DateTime::createFromFormat($format, $date);
        // The Y ( 4 digits year ) returns TRUE for any integer with any number of digits so changing the comparison from == to === fixes the issue.
        return $d && $d->format($format) === $date;
    }