You are here

public static function DatexFormatter::persianDateNames in Datex 7

Returns array containing names of days and monthes in persian.

@todo replace with a translator function like Drupal's t().

2 calls to DatexFormatter::persianDateNames()
DatexFormatter::formatPHP in datex_api/datex_api_classes.inc
Formats a date according to format given.
datex_date_date_select_process_alter in datex_date/datex_date.module
Implements hook date_select_process_alter().

File

datex_api/datex_api_classes.inc, line 63
API and helper functions used by other datex modules.

Class

DatexFormatter
Date tools for Jalali Dates.

Code

public static function persianDateNames() {
  static $names = NULL;
  if (!$names) {
    $names = array(
      'months' => array(
        1 => 'فروردین',
        2 => 'اردیبهشت',
        3 => 'خرداد',
        4 => 'تیر',
        5 => 'مرداد',
        6 => 'شهریور',
        7 => 'مهر',
        8 => 'آبان',
        9 => 'آذر',
        10 => 'دی',
        11 => 'بهمن',
        12 => 'اسفند',
      ),
      'ampm' => array(
        'am' => 'ق.ظ',
        'pm' => 'ب.ظ',
      ),
      'day_abbr' => array(
        6 => 'ش.',
        7 => 'ی.',
        1 => 'د.',
        2 => 'س.',
        3 => 'چ.',
        4 => 'پ.',
        5 => 'ج.',
      ),
      'day' => array(
        6 => 'شنبه',
        7 => 'یک‌شنبه',
        1 => 'دوشنبه',
        2 => 'سه‌شنبه',
        3 => 'چهارشنبه',
        4 => 'پنج‌شنبه',
        5 => 'جمعه',
      ),
      'tz' => 'تهران',
    );
  }
  return $names;
}