Skip to content

Commit

Permalink
Merge pull request #8 from wa7eedem/master
Browse files Browse the repository at this point in the history
casting the $month to integer
  • Loading branch information
aboudeh87 authored Feb 7, 2018
2 parents aa49f01 + 244f016 commit ae885c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static function julianToHijri(float $julianDay)
$z = $z - floor($j * $y + $shift1);

$year = 30 * $cyc + $j;
$month = floor(($z + 28.5001) / 29.5);
$month = (int)floor(($z + 28.5001) / 29.5);
if ($month === 13)
{
$month = 12;
Expand All @@ -116,4 +116,4 @@ public static function julianToHijri(float $julianDay)

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

0 comments on commit ae885c2

Please sign in to comment.