Calendar - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Date and Time : Calendar package : Calendar/DayOfWeek

Calendar

  

DayOfWeek

  

compute the day of the week of a given date

 

Calling Sequence

Parameters

Description

Examples

Compatibility

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

withCalendar:

DayOfWeekDate

5

(1)

DayOfWeek2000,1,1

7

(2)

DayOfWeek2000,12,31

1

(3)

DayOfWeekDate1900,12,31

2

(4)

Maryam Mirzahkani was born on a Tuesday.

DayOfWeekDate1977,5,3,timezone=Asia/Tehran

3

(5)

The battle of Hastings occurred on a Saturday.

DayOfWeek1066,10,14

7

(6)

William the Conqueror was crowned on a Monday.

DayOfWeek1066,12,25

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

Calendar