Finance - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

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

Finance

 DayCount
 calculate the day count according to a given convention

 Calling Sequence DayCount(todate, daycounter) DayCount(fromdate, todate, daycounter)

Parameters

 fromdate - a string containing a date specification in a format recognized by ParseDate or a date data structure; first date todate - a string containing a date specification in a format recognized by ParseDate or a date data structure; second date daycounter - (optional) day counter or the name of a day counting convention

Description

 • The DayCount command returns the number of days between fromdate and todate according to the day counting convention specified by daycounter. If no day counter is specified, the default one will be used.
 • See DayCounter or CalendarsAndDayCounters for a detailed description of the supported day count conventions and additional examples.

Examples

 > $\mathrm{with}\left(\mathrm{Finance}\right):$
 > $\mathrm{DayCount}\left("Dec-20-2005","Nov-05-2006"\right)$
 ${320}$ (1)
 > $\mathrm{DayCount}\left("Dec-20-2005","Nov-05-2006",\mathrm{ISMA}\right)$
 ${320}$ (2)
 > $\mathrm{DayCount}\left("Dec-20-2005","Nov-05-2006",\mathrm{Simple}\right)$
 ${315}$ (3)
 > $\mathrm{DayCount}\left("Dec-20-2005","Nov-05-2006",\mathrm{OneDay}\right)$
 ${1}$ (4)
 > $\mathrm{DC}≔\mathrm{Finance}:-\mathrm{DayCounter}\left(\mathrm{OneDay}\right):$
 > $\mathrm{DayCount}\left("Dec-20-2005","Nov-05-2006",\mathrm{DC}\right)$
 ${1}$ (5)

Compatibility

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

 See Also

## Was this information helpful?

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