AdjustDate - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Finance

  

AdjustDate

  

adjust a non-business day according to the given convention

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

AdjustDate(date, calendar, opts)

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

opts

-

(optional) equation(s) of the form option = value where option is one of convention or output; specify options for the AdjustDate command

Options

• 

The opts argument can contain one or more of the options shown below.

• 

convention =  Unadjusted, Preceding, ModifiedPreceding, Following, ModifiedFollowing, or MonthEndReference -- Provide business day conventions; default value is Following.

• 

output = data or formatted -- Specify the type of output the AdjustDate command should return. If this option is set to data (default) the record containing the data information is returned. Otherwise the data is formatted using the format deduced from the original date.

Description

• 

The AdjustDate function adjusts a non-business day to the appropriate near business day with respect to the given convention.

• 

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.

• 

Business day (date rolling) convention specifies the algorithm used to adjust a date in case it is not a valid business day. Here are the business day conventions supported by the package.

Unadjusted

Do not adjust.

Preceding

Choose the first business day before the given holiday.

ModifiedPreceding

Choose the first business day before the given holiday unless it belongs to a different month, in which case choose the first business day after the holiday.

Following

Choose the first business day after the given holiday.

ModifiedFollowing

Choose the first business day after the given holiday unless it belongs to a different month, in which case choose the first business day before the holiday.

MonthEndReference

Choose the first business day after the given holiday; if the original date falls on the last business day of the month, result reverts to the first business day before month-end.

Examples

withFinance:

Define a calendar with three holidays: September 1, 2006, September 29, 2006, and September 30, 2006.

CCalendarNull:

Holiday1September 1, 2006

Holiday1September 1, 2006

(1)

Holiday2September 29, 2006

Holiday2September 29, 2006

(2)

Holiday3September 30, 2006

Holiday3September 30, 2006

(3)

AddHolidayC,Holiday1,Holiday2,Holiday3

Adjust the first holiday using various business day conventions.

AdjustDateHoliday1,C,convention=Following,output=formatted

September 2, 2006

(4)

AdjustDateHoliday1,C,convention=Preceding,output=formatted

August 31, 2006

(5)

AdjustDateHoliday1,C,convention=ModifiedFollowing,output=formatted

September 2, 2006

(6)

AdjustDateHoliday1,C,convention=ModifiedPreceding,output=formatted

September 2, 2006

(7)

AdjustDateHoliday1,C,convention=MonthEndReference,output=formatted

September 2, 2006

(8)

Adjust the second holiday using various business day conventions.

AdjustDateHoliday2,C,convention=Following,output=formatted

October 1, 2006

(9)

AdjustDateHoliday2,C,convention=Preceding,output=formatted

September 28, 2006

(10)

AdjustDateHoliday2,C,convention=ModifiedFollowing,output=formatted

September 28, 2006

(11)

AdjustDateHoliday2,C,convention=ModifiedPreceding,output=formatted

September 28, 2006

(12)

AdjustDateHoliday2,C,convention=MonthEndReference,output=formatted

September 28, 2006

(13)

Compatibility

• 

The Finance[AdjustDate] command was introduced in Maple 15.

• 

For more information on Maple 15 changes, see Updates in Maple 15.

See Also

Finance[AddHoliday]

Finance[AdvanceDate]

Finance[Calendar]

Finance[Calendars]

Finance[IsBusinessDay]

Finance[IsEndOfMonth]

Finance[IsHoliday]

Finance[JoinBusinessDays]

Finance[JoinHolidays]

Finance[RemoveHoliday]