You are here

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

Checks if the passed in date is in the same year as the instance year.

Parameters

\Drupal\persian_date\Library\Carbon\Carbon|null $dt The instance to compare with or null to use current day.:

Return value

bool

1 call to Carbon::isSameYear()
Carbon::isCurrentYear in src/Library/Carbon/Carbon.php
Determines if the instance is in the current year

File

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

Class

Carbon
A simple API extension for DateTime

Namespace

Drupal\persian_date\Library\Carbon

Code

public function isSameYear(Carbon $dt = null) {
  return $this
    ->isSameAs('Y', $dt);
}