Skip to content

Commit

Permalink
Quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
StaffCollab committed May 1, 2024
1 parent ac919dc commit e5ce82a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/HebrewDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,21 @@ 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);
}

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);
}

Expand Down

0 comments on commit e5ce82a

Please sign in to comment.