function date_week_days_ordered in Date 7
Same name and namespace in other branches
- 5.2 date_api.module \date_week_days_ordered()
- 6.2 date_api.module \date_week_days_ordered()
- 6 date_api.module \date_week_days_ordered()
- 7.3 date_api/date_api.module \date_week_days_ordered()
- 7.2 date_api/date_api.module \date_week_days_ordered()
Order weekdays Correct weekdays array so first day in array matches the first day of the week. Use to create things like calendar headers.
Parameters
array $weekdays:
Return value
array
1 call to date_week_days_ordered()
File
- date_api/
date_api.module, line 866 - 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_ordered($weekdays) {
if (variable_get('date_first_day', 1) > 0) {
for ($i = 1; $i <= variable_get('date_first_day', 1); $i++) {
$last = array_shift($weekdays);
array_push($weekdays, $last);
}
}
return $weekdays;
}