RemoveHoliday - Maple Help

Finance

 RemoveHoliday
 remove a holiday from a calendar

 Calling Sequence RemoveHoliday(calendar, date)

Parameters

 date - a string containing a date specification in a format recognized by ParseDate or a Date data structure calendar - a name representing a supported calendar (e.g. Toronto, NewYork) or a calendar data structure created using the Calendar constructor

Description

 • The RemoveHoliday updates a given calendar by making a given date a regular business day.
 • The parameter date must be a date specified in any of the formats recognized by the ParseDate command.
 • The parameter calendar must be either a name representing a supported calendar (e.g. Toronto, NewYork) or a calendar data structure created using the Calendar constructor.

Examples

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

Create a sample calendar and modify it.

 > $\mathrm{calendar}≔\mathrm{Calendar}\left(\mathrm{Simple}\right)$
 ${\mathrm{calendar}}{≔}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}$ (1)
 > $\mathrm{Holidays}≔\left["January 22, 2004","January 23, 2004","January 24, 2004","January 25, 2004","January 26, 2004","January 27, 2004","January 28, 2004"\right]$
 ${\mathrm{Holidays}}{≔}\left[{"January 22, 2004"}{,}{"January 23, 2004"}{,}{"January 24, 2004"}{,}{"January 25, 2004"}{,}{"January 26, 2004"}{,}{"January 27, 2004"}{,}{"January 28, 2004"}\right]$ (2)
 > $\mathrm{AddHoliday}\left(\mathrm{calendar},\mathrm{Holidays}\right)$
 > $\mathrm{IsHoliday}\left("January 23, 2004",\mathrm{calendar}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{AdjustDate}\left("January 23, 2004",\mathrm{calendar},\mathrm{convention}=\mathrm{Following},\mathrm{output}=\mathrm{formatted}\right)$
 ${"January 29, 2004"}$ (4)
 > $\mathrm{AdjustDate}\left("January 23, 2004",\mathrm{calendar},\mathrm{convention}=\mathrm{Preceding},\mathrm{output}=\mathrm{formatted}\right)$
 ${"January 21, 2004"}$ (5)

Now remove January 23, 2004 from this calendar.

 > $\mathrm{RemoveHoliday}\left("January 23, 2004",\mathrm{calendar}\right)$
 > $\mathrm{IsHoliday}\left("January 23, 2004",\mathrm{calendar}\right)$
 ${\mathrm{false}}$ (6)
 > $\mathrm{AdjustDate}\left("January 23, 2004",\mathrm{calendar},\mathrm{convention}=\mathrm{Following},\mathrm{output}=\mathrm{formatted}\right)$
 ${"January 23, 2004"}$ (7)
 > $\mathrm{AdjustDate}\left("January 23, 2004",\mathrm{calendar},\mathrm{convention}=\mathrm{Preceding},\mathrm{output}=\mathrm{formatted}\right)$
 ${"January 23, 2004"}$ (8)

Compatibility

 • The Finance[RemoveHoliday] command was introduced in Maple 15.
 • For more information on Maple 15 changes, see Updates in Maple 15.