DayOfWeek - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

# Online Help

###### All Products    Maple    MapleSim

Calendar

 DayOfWeek
 compute the day of the week of a given date

 Calling Sequence DayOfWeek( d ) DayOfWeek( year, month, day )

Parameters

 d - Date ; the date whose day of the week is to be computed year - integer; the year month - posint; the month of the year day - posint; the day of the month

Description

 • The DayOfWeek( d ) command computes the day of the week of the Date object d.
 • The DayOfWeek( year, month, day ) command computes the day of the week for the day-th day of the month month (1..12) in the year year.
 • Weekdays are numbered from $1$ to $7$, with $1$ denoting "Sunday", $2$ denoting "Monday", and so on, through $7$ which denotes "Saturday".

Examples

 > $\mathrm{with}\left(\mathrm{Calendar}\right):$
 > $\mathrm{DayOfWeek}\left(\mathrm{Date}\left(\right)\right)$
 ${4}$ (1)
 > $\mathrm{DayOfWeek}\left(2000,1,1\right)$
 ${7}$ (2)
 > $\mathrm{DayOfWeek}\left(2000,12,31\right)$
 ${1}$ (3)
 > $\mathrm{DayOfWeek}\left(\mathrm{Date}\left(1900,12,31\right)\right)$
 ${2}$ (4)

Maryam Mirzakhani was born on a Tuesday.

 > $\mathrm{DayOfWeek}\left(\mathrm{Date}\left(1977,5,3,'\mathrm{timezone}'="Asia/Tehran"\right)\right)$
 ${3}$ (5)

The battle of Hastings occurred on a Saturday.

 > $\mathrm{DayOfWeek}\left(1066,10,14\right)$
 ${7}$ (6)

William the Conqueror was crowned on a Monday.

 > $\mathrm{DayOfWeek}\left(1066,12,25\right)$
 ${2}$ (7)

Compatibility

 • The Calendar[DayOfWeek] command was introduced in Maple 2018.
 • For more information on Maple 2018 changes, see Updates in Maple 2018.

 See Also