function date_week_days in Date 6
Same name and namespace in other branches
- 5.2 date_api.module \date_week_days()
- 6.2 date_api.module \date_week_days()
- 7.3 date_api/date_api.module \date_week_days()
- 7 date_api/date_api.module \date_week_days()
- 7.2 date_api/date_api.module \date_week_days()
A translated array of week days
Parameters
$required: If not required, will include a blank value at the beginning of the array.
Return value
an array of week day names
5 calls to date_week_days()
- date_array in ./
date_api.module - Create an array of values from a date object. Structured like the results of getdate() but not limited to the 32-bit signed range.
- date_calc_get_weekday_fullname in date_php4/
date_php4_calc.inc - Returns the full 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_week_days_abbr in ./
date_api.module - An translated array of week day abbreviations.
File
- ./
date_api.module, line 148 - 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($required = FALSE, $refresh = TRUE) {
static $weekdays;
if ($refresh || empty($weekdays)) {
$weekdays = array();
foreach (date_week_days_untranslated($refresh) as $key => $day) {
$weekdays[$key] = t($day);
}
}
$none = array(
'' => '',
);
return !$required ? $none + $weekdays : $weekdays;
}