You are here

public function Carbon::isYesterday in Persian Date for Drupal 8 8.4

Determines if the instance is yesterday

Return value

bool

File

src/Library/Carbon/Carbon.php, line 1686

Class

Carbon
A simple API extension for DateTime

Namespace

Drupal\persian_date\Library\Carbon

Code

public function isYesterday() {
  return $this
    ->toDateString() === static::yesterday($this
    ->getTimezone())
    ->toDateString();
}