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 e524128 commit bddebb9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/HebrewDate.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@ public static function createFromJewishDate($year, $month, $day): self
throw new InvalidDateException("{$year} is not a leap year.");
}

return HebrewDate::parse(jdtogregorian(jewishtojd($month, $day, $year)));
return self::parse(jdtogregorian(jewishtojd($month, $day, $year)));
}

public function getCalendarInfo($lang = 'gregorian'): array
{
return [
'days' => $lang == 'hebrew' ? $this->getHebrewDaysPeriod() : $this->getDaysPeriod(),
'months' => $lang == 'hebrew' ? $this->getHebrewMonthsPeriod() : $this->getMonthsPeriod(),
'years' => $lang == 'hebrew' ? $this->getHebrewYearsPeriod() : $this->getYearsPeriod()
];
}
}

0 comments on commit bddebb9

Please sign in to comment.