return the interval between two dates as a fraction of the year
YearFraction(fromdate, todate, daycounter)
a string containing a date specification in a format recognized by ParseDate or a Date data structure; first date
a string containing a date specification in a format recognized by ParseDate or a Date data structure; second date
(optional) day counter or the name of a day counting convention
The YearFraction command returns the period between fromdate and todate as a fraction of the year calculated 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.
DC ≔ Finance:-DayCounter⁡OneDay:
SetEvaluationDate⁡November 17, 2006:
November 17, 2006
YearFraction⁡December 01, 2007,December 01, 2008
YearFraction⁡December 01, 2007,December 01, 2008,Thirty360European
YearFraction⁡December 01, 2008
YearFraction⁡December 01, 2008,Thirty360European
The Finance[YearFraction] command was introduced in Maple 15.
For more information on Maple 15 changes, see Updates in Maple 15.
Download Help Document