You are here

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

Determines if the instance is today

Return value

bool

File

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

Class

Carbon
A simple API extension for DateTime

Namespace

Drupal\persian_date\Library\Carbon

Code

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