add a holiday in a calendar - Maple Help

Online Help

All Products    Maple    MapleSim


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

Finance[AddHoliday] - add a holiday in a calendar

Calling Sequence

AddHoliday(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 AddHoliday command updates a given calendar by adding a given date as a holiday.

• 

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 or a calendar data structure created using the Calendar constructor.

Examples

withFinance:

Create a sample calendar and modify it.

C:=CalendarSimple

C:=moduleend module

(1)

Holidays:=January 22, 2004,January 23, 2004,January 24, 2004,January 25, 2004,January 26, 2004,January 27, 2004,January 28, 2004

Holidays:=January 22, 2004,January 23, 2004,January 24, 2004,January 25, 2004,January 26, 2004,January 27, 2004,January 28, 2004

(2)

AddHolidayC,Holidays

IsHolidayJanuary 23, 2004,C

true

(3)

AdjustDateJanuary 23, 2004,C,convention=Following,output=formatted

January 29, 2004

(4)

AdjustDateJanuary 23, 2004,C,convention=Preceding,output=formatted

January 21, 2004

(5)

See Also

Finance[AdjustDate], Finance[AdvanceDate], Finance[Calendar], Finance[Calendars], Finance[IsBusinessDay], Finance[IsEndOfMonth], Finance[IsHoliday], Finance[JoinBusinessDays], Finance[JoinHolidays], Finance[RemoveHoliday]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam