From 244f0160e4e46f5ee430eadb905d07422f80a962 Mon Sep 17 00:00:00 2001 From: atmonshi Date: Wed, 7 Feb 2018 13:44:27 +0300 Subject: [PATCH 1/2] 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 +} From 321acc1a3a9ada9dadd8f5c7d36593d4dff44ec5 Mon Sep 17 00:00:00 2001 From: amirovn Date: Sun, 21 Oct 2018 23:43:07 +0300 Subject: [PATCH 2/2] Add new Russian language --- src/Translations/Russian.php | 96 ++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 src/Translations/Russian.php diff --git a/src/Translations/Russian.php b/src/Translations/Russian.php new file mode 100644 index 0000000..fc17120 --- /dev/null +++ b/src/Translations/Russian.php @@ -0,0 +1,96 @@ +hijriMonths; + } + + /** + * get array of short days names + * started from Sunday + * + * @return array + */ + public function getShortDays(): array + { + return $this->shortDays; + } + + /** + * get array of months names + * started from Sunday + * + * @return array + */ + public function getDays(): array + { + return $this->days; + } + + /** + * get array of periods + * + * @return array + */ + public function getPeriods(): array + { + return $this->periods; + } +} \ No newline at end of file