You are here

function date_repeat_dow2day in Date 8

Same name and namespace in other branches
  1. 5.2 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.

2 calls to date_repeat_dow2day()
DateRRuleCalc::add_current_day in date_repeat/lib/Drupal/date_repeat/DateRRuleCalc.php
Helper function to add current date to the $dates array.
DateRRuleCalc::complete_rrule in date_repeat/lib/Drupal/date_repeat/DateRRuleCalc.php
See if the RRULE needs some imputed values added to it.

File

date_repeat/date_repeat.module, line 166
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];
}