DayMatchQ

DayMatchQ[date,daytype]
returns True if the date matches the daytype specification and returns False otherwise.

Details and OptionsDetails and Options

  • A date can be specified in the following forms:
  • DateObject[]date object
    {y,m,d}year, month, day
    {y,m}the first day of the specified month
    {y}the first day of the first month of the year y
    "string"date as a string ()
  • Possible day types are: All (default), , , Monday through Sunday, , , and .
  • DayMatchQ takes the following options:
  • CalendarType"Gregorian"calendar in which the date has been specified
    HolidayCalendar{"UnitedStates","Default"}holiday schedule and subspecification for the business day and holiday computations
  • In the Jewish calendar, the weekdays are Sunday through Thursday.

ExamplesExamplesopen allclose all

Basic Examples  (5)Basic Examples  (5)

Find out if today is a weekend:

In[1]:=
Click for copyable input
Out[1]=

Or a business day:

In[1]:=
Click for copyable input
Out[1]=

Find out if today is a non-weekend holiday:

In[1]:=
Click for copyable input
Out[1]=

Find out if July 4 is a holiday in Brazil:

In[1]:=
Click for copyable input
Out[1]=

Or in the US:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2012
(9.0)
| Updated in 2014
(10.0)