diff --git a/src/HebrewDate.php b/src/HebrewDate.php index 212c009..bf40d35 100644 --- a/src/HebrewDate.php +++ b/src/HebrewDate.php @@ -43,6 +43,10 @@ public function addHebrewYears(int $year = 1): self { $this->jewishYear += $year; + if($this->jewishMonth == 6 && ! $this->isJewishLeapYear()) { + $this->jewishMonth++; + } + return self::createFromJewishDate($this->jewishYear, $this->jewishMonth, $this->jewishDay); } @@ -50,6 +54,10 @@ public function subHebrewYears(int $year = 1): self { $this->jewishYear -= $year; + if($this->jewishMonth == 6 && ! $this->isJewishLeapYear()) { + $this->jewishMonth++; + } + return self::createFromJewishDate($this->jewishYear, $this->jewishMonth, $this->jewishDay); }