You are here

function date_week_days_abbr in Date 6

Same name and namespace in other branches
  1. 5.2 date_api.module \date_week_days_abbr()
  2. 6.2 date_api.module \date_week_days_abbr()
  3. 7.3 date_api/date_api.module \date_week_days_abbr()
  4. 7 date_api/date_api.module \date_week_days_abbr()
  5. 7.2 date_api/date_api.module \date_week_days_abbr()

An translated array of week day abbreviations.

Parameters

$required: If not required, will include a blank value at the beginning of the array.

Return value

an array of week day abbreviations

5 calls to date_week_days_abbr()
DateAPI::testDateAPI in tests/date_api.test
date_calc_get_weekday_abbrname in date_php4/date_php4_calc.inc
Returns the abbreviated weekday name for the given date.
date_day_of_week_name in ./date_api.module
Returns translated name of the day of week for a given date.
date_php4.inc in date_php4/date_php4.inc
date_popup_process_date in date_popup/date_popup.module
Process the date portion of the element.

File

./date_api.module, line 168
This module will make the date API available to other modules. Designed to provide a light but flexible assortment of functions and constants, with more functionality in additional files that are not loaded unless other modules specifically include them.

Code

function date_week_days_abbr($required = FALSE, $refresh = TRUE, $length = 3) {
  if ($refresh || empty($weekdays)) {
    $weekdays = array();
    foreach (date_week_days($refresh) as $key => $day) {
      $weekdays[$key] = substr($day, 0, $length);
    }
  }
  $none = array(
    '' => '',
  );
  return !$required ? $none + $weekdays : $weekdays;
}