WordPress at a glance
function is not described

Requests_Cookie::is_expired() public WP 1.0

Check if a cookie is expired.

Checks the age against $this->reference_time to determine if the cookie is expired.

{} It's a method of the class: Requests_Cookie{}

No Hooks.

Return

true|false. True if expired, false if time is valid.

Usage

$Requests_Cookie = new Requests_Cookie();
$Requests_Cookie->is_expired();

Code of Requests_Cookie::is_expired() WP 5.7.2

<?php
public function is_expired() {
	// RFC6265, s. 4.1.2.2:
	// If a cookie has both the Max-Age and the Expires attribute, the Max-
	// Age attribute has precedence and controls the expiration date of the
	// cookie.
	if (isset($this->attributes['max-age'])) {
		$max_age = $this->attributes['max-age'];
		return $max_age < $this->reference_time;
	}

	if (isset($this->attributes['expires'])) {
		$expires = $this->attributes['expires'];
		return $expires < $this->reference_time;
	}

	return false;
}