Skip to content

Commit ae885c2

Browse files
authored
Merge pull request #8 from wa7eedem/master
casting the $month to integer
2 parents aa49f01 + 244f016 commit ae885c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Converter.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public static function julianToHijri(float $julianDay)
106106
$z = $z - floor($j * $y + $shift1);
107107

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

117117
return (object) ['year' => (int) $year, 'month' => (int) $month, 'day' => (int) $day];
118118
}
119-
}
119+
}

0 commit comments

Comments
 (0)