You are here

function date_repeat_dow_day_options in Date 7

Same name and namespace in other branches
  1. 8 date_repeat/date_repeat.module \date_repeat_dow_day_options()
  2. 5.2 date_repeat/date_repeat.module \date_repeat_dow_day_options()
  3. 6.2 date_repeat/date_repeat.module \date_repeat_dow_day_options()
  4. 6 date_repeat/date_repeat.module \date_repeat_dow_day_options()
  5. 7.3 date_repeat/date_repeat.module \date_repeat_dow_day_options()
  6. 7.2 date_repeat/date_repeat.module \date_repeat_dow_day_options()

Helper function for FREQ options.

Translated and untranslated arrays of the iCal day of week names. We need the untranslated values for date_modify(), translated values when displayed to user.

7 calls to date_repeat_dow_day_options()
date_content_repeat_dow_options in ./date.devel_generate.inc
Helper function for BYDAY options.
date_repeat_days_ordered in date_repeat/date_repeat.module
Shift the array of iCal day names into the right order for a specific week start day.
date_repeat_dow2day in date_repeat/date_repeat.module
Translate a day of week position to the iCal day name.
date_repeat_dow_day_options_ordered in date_repeat/date_repeat.module
date_repeat_dow_options in date_repeat/date_repeat.module
Helper function for BYDAY options.

... See full list

File

date_repeat/date_repeat.module, line 78
This module creates a form element that allows users to select repeat rules for a date, and reworks the result into an iCal RRULE string that can be stored in the database.

Code

function date_repeat_dow_day_options($translated = TRUE) {
  return array(
    'SU' => $translated ? t('Sunday', array(), array(
      'context' => 'day_name',
    )) : 'Sunday',
    'MO' => $translated ? t('Monday', array(), array(
      'context' => 'day_name',
    )) : 'Monday',
    'TU' => $translated ? t('Tuesday', array(), array(
      'context' => 'day_name',
    )) : 'Tuesday',
    'WE' => $translated ? t('Wednesday', array(), array(
      'context' => 'day_name',
    )) : 'Wednesday',
    'TH' => $translated ? t('Thursday', array(), array(
      'context' => 'day_name',
    )) : 'Thursday',
    'FR' => $translated ? t('Friday', array(), array(
      'context' => 'day_name',
    )) : 'Friday',
    'SA' => $translated ? t('Saturday', array(), array(
      'context' => 'day_name',
    )) : 'Saturday',
  );
}