Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/GeniusTS/hijri-dates
Browse files Browse the repository at this point in the history
  • Loading branch information
aboudeh87 committed Apr 11, 2019
2 parents d38d677 + 889db28 commit c89ea43
Show file tree
Hide file tree
Showing 2 changed files with 98 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];
}
}
}
96 changes: 96 additions & 0 deletions src/Translations/Russian.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<?php

namespace GeniusTS\HijriDate\Translations;


/**
* Class Russian
*
* @package GeniusTS\HijriDate\Translations
*/
class Russian implements TranslationInterface
{

/**
* Hijri Months names
*
* @var array
*/
protected $hijriMonths = [
'Мухаррам',
'Сафар',
'Раби аль-авваль',
'Раби ас-сани',
'Джумада аль-уля',
'Джумада ас-сани',
'Раджаб',
'Шабан',
'Рамадан',
'Шавваль',
'Зу-ль-када',
'Зу-ль-хиджа',
];

/**
* short days
*
* @var array
*/
protected $shortDays = ['ВС', 'ПН', 'ВТ', 'СР', 'ЧТ', 'ПТ', 'СБ'];

/**
* days names
*
* @var array
*/
protected $days = ['Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота'];

/**
* periods
*
* @var array
*/
protected $periods = ['am', 'pm'];

/**
* get array of months names
*
* @return array
*/
public function getHijriMonths(): array
{
return $this->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;
}
}

0 comments on commit c89ea43

Please sign in to comment.