Skip to content

Commit

Permalink
Fix bug 'Displaying 0 for 1st day of Shawwal' #1
Browse files Browse the repository at this point in the history
  • Loading branch information
aboudeh87 committed Jun 30, 2017
1 parent 64da929 commit 4552368
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ public static function julianToHijri(float $julianDay)
{
$month = 12;
}

$day = $z - floor(29.5001 * $month - 29);
$day = $day < 1 ? 1 : floor($day);

return (object) ['year' => (int) $year, 'month' => (int) $month, 'day' => (int) $day];
}
Expand Down

0 comments on commit 4552368

Please sign in to comment.