This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

DayOfWeek


gives the day of the week on which the given date occurred.

gives the day of the week for the given date.
  • The following options can be given:
CalendarAutomaticspecifies which calendar system to use
  • The default calendar is the usual Western (American) calendar, but can be changed with the Calendar option.
The Declaration of Independence was signed on a Thursday:
The Bastille was stormed on a Tuesday:
Canada became an independent nation on a Monday:
Wolfram Research began on a Saturday:
This gives the day of the week at the time the formula was input:
Hours, minutes, and seconds do not affect the day of the week:
Needs["Calendar`"]
The Declaration of Independence was signed on a Thursday:
In[2]:=
Click for copyable input
Out[2]=
 
Needs["Calendar`"]
The Bastille was stormed on a Tuesday:
In[2]:=
Click for copyable input
Out[2]=
 
Needs["Calendar`"]
Canada became an independent nation on a Monday:
In[2]:=
Click for copyable input
Out[2]=
 
Needs["Calendar`"]
Wolfram Research began on a Saturday:
In[2]:=
Click for copyable input
Out[2]=
 
Needs["Calendar`"]
This gives the day of the week at the time the formula was input:
In[2]:=
Click for copyable input
Out[2]=
 
Needs["Calendar`"]
Hours, minutes, and seconds do not affect the day of the week:
In[2]:=
Click for copyable input
Out[2]=
Dates in Catholic countries after October 14, 1582, and before September 14, 1752, require the Gregorian option.
Louis XIV was born on a Sunday:
Russian Orthodox dates require the Julian option. Russian Orthodox Christmas 2000 was on a Sunday:
The Islamic calendar begins on a Friday:
This date corresponds to one attribution of the Hejira, July 16, 622, in the Western (Julian) calendar:
By definition, Yom Kippur cannot fall on a Friday or Sunday:
Because the Jewish calendar has a leap month preceding Passover, Mathematica uses a numbering starting with Nissan, the month of Passover, and Tishrei, the first month of the Jewish year, is number 7.
By definition, the Western calendar rules follow a 400-year cycle. This cycle also includes days of the week, since:
That is, the 400-year cycle has an integral number of weeks (otherwise, the cycle would have 2800 years).
A century never begins on a Sunday:
No matter how the beginning of a century is defined:
The Western calendar was modified from Julian to Gregorian for better accuracy. The change deleted 10 days in October 1582 in Catholic countries and deleted 11 days in September 1752 in Britain and her colonies. By default, Mathematica applies the British (American) version. These calendar changes did not affect the day of the week, so there is an issue for DayOfWeek concerning dates after October 14, 1582, and before September 14, 1752. For British dates, the default gives the correct answer. For dates in Catholic countries, it is necessary to use the Gregorian option for Calendar.
The calendar change did not affect days of the week:
George Washington was born on a Tuesday:
Voltaire was born on a Sunday:
Dates after September 2, 1752 and before September 14, 1752 are not accepted by the Automatic option. Use the Gregorian or Julian option for these dates (valid only for non-British Western countries):
This computes the number of times each day of the week occurs as a 13^(th) of the month over the complete 400-year cycle of the Western (Gregorian) calendar:
The 13^(th) of the month falls more often on a Friday than on any other day of the week.