From 244f0160e4e46f5ee430eadb905d07422f80a962 Mon Sep 17 00:00:00 2001 From: atmonshi Date: Wed, 7 Feb 2018 13:44:27 +0300 Subject: [PATCH] casting the $month --- src/Converter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Converter.php b/src/Converter.php index 5d07eb0..74d5981 100644 --- a/src/Converter.php +++ b/src/Converter.php @@ -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; @@ -116,4 +116,4 @@ public static function julianToHijri(float $julianDay) return (object) ['year' => (int) $year, 'month' => (int) $month, 'day' => (int) $day]; } -} \ No newline at end of file +}