You are here

function date_repeat_dow2day in Date 5.2

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

Translate a day of week position to the iCal day name.

Used with date_format($date, 'w') or get_variable('date_first_day'), which return 0 for Sunday, 1 for Monday, etc.

dow 2 becomes 'TU', dow 3 becomes 'WE', and so on.

3 calls to date_repeat_dow2day()
date_api_ical_build_rrule in ./date_api_ical.inc
Build an iCal RULE from $form_values.
date_repeat_add_dates in date_repeat/date_repeat_calc.inc
Helper function to add found date to the $dates array.
date_repeat_adjust_rrule in date_repeat/date_repeat_calc.inc
See if the RRULE needs some imputed values added to it.

File

date_repeat/date_repeat.module, line 124
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_dow2day($dow) {
  $days_of_week = array_keys(date_repeat_dow_day_options(FALSE));
  return $days_of_week[$dow];
}