Check if the Coupon is already Expired

@return bool
355547
public function isExpired()
    {
        $ret = true;

        $now = new \DateTime();
        if ($this->expirationDate > $now) {
            $ret = false;
        }

        return $ret;
    }
702817
public function expired($onSessionExpires = false)
    {
        if (!$this->_data['expires'] && $onSessionExpires) {
            return true;
        }

        return $this->_data['expires'] < time() && $this->_data['expires'];
    }
67253
def is_expired(self):
        
        expires_at = self.expires_at
        if expires_at is not None and expires_at != self.created:
            return expires_at < datetime.utcnow()

        return False
198962
public function getExpiredAfter()
    {
        if (!is_string($this->expiredAfterAttribute) || empty($this->expiredAfterAttribute)) {
            return false;
        }
        return (int)($this->{$this->expiredAfterAttribute});
    }
901038
public function isAccessTokenExpired() {
    if (null == $this->token) {
      return true;
    }

    // If the token is set to expire in the next 30 seconds.
    $expired = ($this->token['created']
        + ($this->token['expires_in'] - 30)) < time();

    return $expired;
  }
412104
private function checkExpiration()
    {
        if (!$this->hasLifetime) {
            return;
        }

        if (!isset($this->payload['exp']) || !is_numeric($this->payload['exp'])) {
            return $this->state = self::INVALID;
        }

        if ($this->clockSkew <= (new \DateTime())->format('U') - $this->payload['exp']) {
            $this->state = self::EXPIRED;
        }
    }
566512
public function isExpired(DateTime $date = null)
    {
        // Here we'll determine if the account expires by checking is expiration date.
        if ($expirationDate = $this->expirationDate()) {
            $date = $date ?: new DateTime();

            return $expirationDate <= $date;
        }

        // The account has no expiry date.
        return false;
    }
1010811
public function isExpiredLink()
    {
        if (($sKey = $this->getUpdateId())) {
            $blExpired = oxNew(\OxidEsales\Eshop\Application\Model\User::class)->isExpiredUpdateId($sKey);
        }

        return $blExpired;
    }
537125
public function isExpired()
    {
        $createdSeconds = strtotime($this->Created);

        $validForSeconds = (int) $this->ValidForDays * 24 * 60 * 60;

        $nowSeconds = DBDatetime::now()->getTimestamp();

        return ($createdSeconds + $validForSeconds) <= $nowSeconds;
    }
204723
public function purgeExpired()
    {

        if ($this->sqlInitialized()) {
            if ($this->sql) {
                if ($this->sql->query("
                    DELETE
                        FROM `{$this->table}`
                        WHERE `expire` < NOW()
                ")) {
                    return true;
                }
            }
        }
        return false;
    }
684260
protected function isExpired()
    {
        if (! $this->filesystem->exists($this->cached)) {
            return true;
        }

        $lastModified = $this->filesystem->lastModified($this->file->getPath());

        return $lastModified >= $this->filesystem->lastModified($this->cached);
    }
1015049
private function getExpired()
    {
        if (count($this->expired) < 1) {
            return null;
        }
        $expired = key($this->expired);
        $this->increment($this->expired);
        return $expired;
    }
509029
public function expire()
    {
        list($key, $groupKey) = $this->getKeys(func_get_args());
        $this->engine->setGroupKey($groupKey);

        if (!$this->engine->isValid($key)) {
            return false;
        }

        return $this->engine->expire($key);
    }
903577
private function isExpired(TimePoint $now)
    {
        if ($this->expiry === null) {
            return false;
        }

        // -1 signifies the now is BEFORE $expiry
        return ($now->compare($this->expiry) !== -1);
    }
1295111
function check_expiration() {
		$license_data = get_option( $this->product->get_key() . '_license_data', '' );
		if ( '' === $license_data ) {
			return false;
		}
		if ( ! isset( $license_data->expires ) ) {
			return false;
		}
		if ( strtotime( $license_data->expires ) - time() > 30 * 24 * 3600 ) {
			return false;
		}

		return true;
	}
860896
def _check(self):
        """"""
        import time

        if self.expires_in is None or self.authenticated is None:
            return False

        current = time.time()
        expire_time = self.authenticated + self.expires_in

        return expire_time > current
602713
public function isExpired() : bool
    {
        return $this->getExpiryAttribute()->timestamp < Carbon::now()->timestamp
            && $this->length !== 0
            && !$this->isRemoved();
    }