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

Online Help

Finance

  

YearFraction

  

return the interval between two dates as a fraction of the year

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

YearFraction(todate, daycounter)

YearFraction(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 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.

Examples

(1)

(2)

(3)

(4)

(5)

(6)

(7)

(8)

(9)

(10)

Compatibility

• 

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

• 

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

See Also

Finance[DayCount]

Finance[DayCounter]

Finance[FormatDate]

Finance[ParseDate]

 


Download Help Document