function event_week_days in Event 5
Same name and namespace in other branches
- 5.2 event.module \event_week_days()
Returns week day names and thier translated values, corrected for the start of week day settings (mon or sun)
Return value
an associative array containing weekday names
Related topics
7 calls to event_week_days()
- event_calendar_day in ./
event.module - Displays a daily event calendar.
- event_calendar_list in ./
event.module - Creates a themed list of events.
- event_calendar_month in ./
event.module - Displays a monthly event calendar.
- event_calendar_table in ./
event.module - Creates a themed table of events.
- event_calendar_week in ./
event.module - Displays a weekly event calendar.
File
- ./
event.module, line 1313
Code
function event_week_days() {
static $weekdays;
if (!$weekdays) {
if (variable_get('date_first_day', 1)) {
$weekdays = array(
array(
'day' => 'Mon',
't' => t('Mon'),
),
array(
'day' => 'Tue',
't' => t('Tue'),
),
array(
'day' => 'Wed',
't' => t('Wed'),
),
array(
'day' => 'Thu',
't' => t('Thu'),
),
array(
'day' => 'Fri',
't' => t('Fri'),
),
array(
'day' => 'Sat',
't' => t('Sat'),
),
array(
'day' => 'Sun',
't' => t('Sun'),
),
);
}
else {
$weekdays = array(
array(
'day' => 'Sun',
't' => t('Sun'),
),
array(
'day' => 'Mon',
't' => t('Mon'),
),
array(
'day' => 'Tue',
't' => t('Tue'),
),
array(
'day' => 'Wed',
't' => t('Wed'),
),
array(
'day' => 'Thu',
't' => t('Thu'),
),
array(
'day' => 'Fri',
't' => t('Fri'),
),
array(
'day' => 'Sat',
't' => t('Sat'),
),
);
}
}
return $weekdays;
}