You are here

public function HijriFormatter::hijriMonthNames in Hijri 3.0.x

Same name and namespace in other branches
  1. 8.2 src/HijriFormatter.php \Drupal\hijri\HijriFormatter::hijriMonthNames()
  2. 1.0.x src/HijriFormatter.php \Drupal\hijri\HijriFormatter::hijriMonthNames()

Retrive Hijri months names.

1 call to HijriFormatter::hijriMonthNames()
HijriFormatter::hijri in src/HijriFormatter.php
Retrive Hijri date from given format and timestamp.

File

src/HijriFormatter.php, line 221

Class

HijriFormatter
Provides a service to handle Hijri date related functionality.

Namespace

Drupal\hijri

Code

public function hijriMonthNames() {

  // This Arabic names should written in English with t() function.
  return [
    '1' => (string) $this
      ->t('Muharram'),
    '2' => (string) $this
      ->t('Safar'),
    '3' => (string) $this
      ->t('Rabia al-Awwal'),
    '4' => (string) $this
      ->t('Rabia ath-Thani'),
    '5' => (string) $this
      ->t('Jumada al-Ula'),
    '6' => (string) $this
      ->t('Jumada ath-Thaniya'),
    '7' => (string) $this
      ->t('Rajab'),
    '8' => (string) $this
      ->t('Shaban'),
    '9' => (string) $this
      ->t('Ramadan'),
    '10' => (string) $this
      ->t('Shawwal'),
    '11' => (string) $this
      ->t('Dhu al-Qada'),
    '12' => (string) $this
      ->t('Dhu al-Hijja'),
  ];
}