CALC.yearfrac(date1, date2, [basis])

Returns a fraction of a year based on the number of days between the two specified dates. Basis is an optional parameter which specifies the type of year count basis to use (Default = US 30/360, 1 = Actual/actual, 2 = Actual/360, 3= Actual/365, 4 = European 30/360).

Example

CALC.yearfrac(new Date(2005,0,1), new Date(2005,5,30));

// returns 0.497221

<< CALC.year(date) © 1996-2013 InetSoft Technology Corporation (v11.5) JS.7.2 Financial Functions >>