function _calendar_day_of_week in Calendar 5
Return the day of week with start of week offset applied
Parameters
$stamp GMT timestamp:
Return value
integer day of the week
1 call to _calendar_day_of_week()
- calendar_get_calendar in ./
calendar_api.inc - Adapted from event_get_calendar() function in the event module Reworked to remove dependency on event module
File
- ./
calendar_api.inc, line 473
Code
function _calendar_day_of_week($stamp) {
calendar_load_date_api();
$dow = date_format_date('w', $stamp);
if ($dow - variable_get('date_first_day', 1) >= 0) {
$dow = $dow - variable_get('date_first_day', 1);
}
else {
$dow = 7 - variable_get('date_first_day', 1);
}
return $dow;
}