[DayNumber,DayName]
= weekday(D,language) returns
the abbreviated name for the day of the week in the language of the
locale specified in language.
[DayNumber,DayName]
= weekday(D,DayForm,language)
returns the name for the day of the week in the specified format and
in the language of the specified locale. You can specify DayForm and language in
either order.
Determine the day of the week for a date specified in the format mmm.dd.yyyy. Call datenum inside of weekday to specify the format of the input text representing a date.
D — Serial date numbers or text representing dates and times vector | matrix | character vector | cell array of character vectors | string array | character array
Serial date numbers or text representing dates and times. Date numbers can be specified as a
vector or matrix. Text can be specified as a character vector, a cell array
of character vectors, a string array, or a character array where each row
represents a date. If D is a cell array of character
vectors or a string array, then it must be 1-by-n or
n-by-1.
If D is a character vector, a cell array of character vectors, a string
array, or a character array, then the dates can be in one of the following
formats.
Date Format
Example
dd-mmm-yyyy
01-Mar-2000
mm/dd/yyyy
03/01/2000
yyyy-mm-dd
2000-03-01
For text representing dates in other formats, first convert
the dates to serial date numbers using the datenum function,
before passing them to weekday.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.