Finance - Maple Programming Help

Home : Support : Online Help : Mathematics : Finance : Date Arithmetic : Finance/DayOfWeek

Finance

 DayOfWeek
 return the day of the week on which the given date falls

 Calling Sequence DayOfWeek(date)

Parameters

 date - a string containing a date specification in a format recognized by ParseDate or a Date data structure; date

Description

 • The DayOfWeek command returns the day of the week on which the given date falls.

Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$

Return the day of the week for dates given in the string form.

 > $\mathrm{DayOfWeek}\left("November 09, 2006"\right)$
 ${\mathrm{Thursday}}$ (1)
 > $\mathrm{DayOfWeek}\left("Nov-09-07"\right)$
 ${\mathrm{Wednesday}}$ (2)

Return the day of the week for a date given as a record.

 > $\mathrm{date}≔\mathrm{FormatDate}\left("November 19, 2006",\mathrm{record}\right)$
 ${\mathrm{date}}{≔}{\mathrm{Record}}{}\left({\mathrm{weekDay}}{=}{1}{,}{\mathrm{monthDay}}{=}{19}{,}{\mathrm{month}}{=}{11}{,}{\mathrm{year}}{=}{2006}{,}{\mathrm{format}}{=}{"%B %e, %Y"}\right)$ (3)
 > $\mathrm{DayOfWeek}\left(\mathrm{date}\right)$
 ${\mathrm{Sunday}}$ (4)

Return the day of the week for a date given as a list.

 > $\mathrm{date}≔\mathrm{FormatDate}\left("November 19, 2006",\mathrm{list}\right)$
 ${\mathrm{date}}{≔}\left[{19}{,}{11}{,}{2006}\right]$ (5)
 > $\mathrm{DayOfWeek}\left(\mathrm{date}\right)$
 ${\mathrm{Sunday}}$ (6)

By default the global evaluation date is used.

 > $\mathrm{SetEvaluationDate}\left("November 19, 2006"\right):$
 > $\mathrm{EvaluationDate}\left(\right)$
 ${"November 19, 2006"}$ (7)
 > $\mathrm{DayOfWeek}\left(\right)$
 ${\mathrm{Sunday}}$ (8)

Compatibility

 • The Finance[DayOfWeek] command was introduced in Maple 15.