JoinBusinessDays - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Finance

 JoinBusinessDays
 construct new calendar by joining business days from the given two calendars

 Calling Sequence JoinBusinessDays(calendar1, calendar2)

Parameters

 calendar1 - a name representing a supported calendar (e.g. Toronto, NewYork) or a calendar data structure created using the Calendar constructor calendar2 - a name representing a supported calendar (e.g. Toronto, NewYork) or a calendar data structure created using the Calendar constructor

Description

 • The JoinBusinessDays command creates a new calendar obtained by joining business days from the given two calendars. Any dates that are business days in either of the given two calendars become business days in the new calendar.

Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$
 > $\mathrm{Calendar1}≔\mathrm{Calendar}\left(\mathrm{Toronto}\right):$
 > $\mathrm{Calendar2}≔\mathrm{Calendar}\left(\mathrm{Simple}\right)$
 ${\mathrm{Calendar2}}{≔}{\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{AddHoliday}\left(\mathrm{Calendar2},"January 4, 2006"\right):$
 > $\mathrm{IsHoliday}\left("January 3, 2006",\mathrm{Calendar1}\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{IsBusinessDay}\left("January 3, 2006",\mathrm{Calendar1}\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{IsHoliday}\left("January 1, 2006",\mathrm{Calendar1}\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{IsBusinessDay}\left("January 1, 2006",\mathrm{Calendar1}\right)$
 ${\mathrm{false}}$ (5)
 > $\mathrm{Calendar3}≔\mathrm{JoinBusinessDays}\left(\mathrm{Calendar1},\mathrm{Calendar2}\right):$
 > $\mathrm{IsHoliday}\left("January 1, 2006",\mathrm{Calendar3}\right)$
 ${\mathrm{true}}$ (6)
 > $\mathrm{IsHoliday}\left("January 4, 2006",\mathrm{Calendar3}\right)$
 ${\mathrm{false}}$ (7)
 > $\mathrm{RemoveHoliday}\left("January 1, 2006",\mathrm{Calendar3}\right):$
 > $\mathrm{IsHoliday}\left("January 1, 2006",\mathrm{Calendar3}\right)$
 ${\mathrm{false}}$ (8)

Compatibility

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

 See Also