You are here

function date_calc_get_weekday_abbrname in Date 6

Same name and namespace in other branches
  1. 5.2 date_php4/date_php4_calc.inc \date_calc_get_weekday_abbrname()
  2. 6.2 date_php4/date_php4_calc.inc \date_calc_get_weekday_abbrname()

Returns the abbreviated weekday name for the given date.

Parameters

int $day: The day of the month.

int $month: The month.

int $year: The year. Use the complete year instead of the abbreviated version. E.g. use 2005, not 05. Do not add leading 0's for years prior to 1000.

int $length: The length of abbreviation.

Return value

string The abbreviated name of the day of the week.

1 call to date_calc_get_weekday_abbrname()
date_calc_format in date_php4/date_php4_calc.inc
Formats the date in the given format, much like strfmt()

File

date_php4/date_php4_calc.inc, line 523

Code

function date_calc_get_weekday_abbrname($day = 0, $month = 0, $year = 0) {
  if (empty($year)) {
    $year = date_calc_get_year();
  }
  if (empty($month)) {
    $month = date_calc_get_month();
  }
  if (empty($day)) {
    $day = date_calc_get_day();
  }
  $weekday_names = date_week_days_abbr();
  $weekday = date_dow($day, $month, $year);
  return $weekday_names[$weekday];
}