d1% = Day(pDateFrom)
m1% = Month(pDateFrom)
y1% = Year(pDateFrom)
d2% = Day(pDateTo)
m2% = Month(pDateTo)
y2% = Year(pDateTo)
ElseIf sDayBasis = "7" Or sDayBasis = "Excel30" Then
'30/360 PSA 30, NASD 30, used only by MS Excel and Quantum
'also: Excel simply backtracks by 3 or 6 months as
'appropriate. When it hits February 29th becomes 28th...
'they never go back to 29th. (that may be only in some
'versions of excel)
'handle last day in February (work with 1st day in march)
dtTemp1 = pDateFrom + 1
If (Day(dtTemp1) = 1) And (Month(dtTemp1) = 3) Then 'last day Feb
d1% = 30
End If
If (d2% = 31) And (d1% = 30) Then
d2% = 30
End If
gfnDayDiff = ((y2% - y1%) * 360) + ((m2 - m1) * 30) + (d2% - d1%)
Pretty much the same as Bloomberg/SIA/ISDA/MSRB/BMA if you
stay away from the end of the month. Which is one reason
why US bonds are typically issued on the 15th...
(david)