1 date.inc date_day_of_week_name($date = NULL, $abbr = TRUE)

Returns translated name of the day of week for a given date.


mixed $date: (optional) A date, default is current local day. Defaults to NULL.

string $abbr: (optional) Whether to return the abbreviated name for that day. Defaults to TRUE.

Return value

string: The name of the day in the week for that date.


core/includes/date.inc, line 916
Date API functions.


function date_day_of_week_name($date = NULL, $abbr = TRUE) {
  if (!is_object($date)) {
    $date = new BackdropDateTime($date);
  $dow = date_day_of_week($date);
  $days = $abbr ? date_week_days_abbr() : date_week_days();
  return $days[$dow];