You are here

function moment_info_weekdays in Moment.js 7.2

Same name and namespace in other branches
  1. 8.2 moment.module \moment_info_weekdays()

Provide information about weekdays.

Return value

array Zero based numeric indexes. Values are array with the following keys:

  • numeric: int Numeric identifier.
  • name: string Machine name.
  • label: string Localized name of the day.
1 call to moment_info_weekdays()
moment_weekday_options in ./moment.module
Build an option list from weekdays.

File

./moment.module, line 394
Moment.js integration.

Code

function moment_info_weekdays() {
  return [
    [
      'numeric' => 0,
      'name' => 'sunday',
      'label' => t('Sunday'),
    ],
    [
      'numeric' => 1,
      'name' => 'monday',
      'label' => t('Monday'),
    ],
    [
      'numeric' => 2,
      'name' => 'tuesday',
      'label' => t('Tuesday'),
    ],
    [
      'numeric' => 3,
      'name' => 'wednesday',
      'label' => t('Wednesday'),
    ],
    [
      'numeric' => 4,
      'name' => 'thursday',
      'label' => t('Thursday'),
    ],
    [
      'numeric' => 5,
      'name' => 'friday',
      'label' => t('Friday'),
    ],
    [
      'numeric' => 6,
      'name' => 'saturday',
      'label' => t('Saturday'),
    ],
  ];
}