Skip to content

Commit

Permalink
Adjust hijri adjustment in preparation for new Hijri Calculator
Browse files Browse the repository at this point in the history
  • Loading branch information
meezaan committed Dec 25, 2024
1 parent 0f2fb18 commit 44faac3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/Models/HijriCalendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ public function adjustHijriDate($date, int $days): string | false

if ($day > $daysInMonth) {
// Adjust it and increase the month
$day = $day - $daysInMonth;
// $day = $day - $daysInMonth;
$day = 1; // Always make it the first day of the month, because you don't ever want to go from 29th of the current one to the 2nd of the next one
$month = $month + 1;
}

Expand Down

0 comments on commit 44faac3

Please sign in to comment.