<-- Previous || Up || Next -->

Days 360 Function
Math Financial Class

Public Function Days360( _
      ByVal vFm As Variant _
    , ByVal vTo As Variant _
    , Optional ByVal vEuroMethod As Variant _
    , Optional ByVal vExcelVersion As Variant _
    ) As Variant

Determine the number of days between two dates using the specified day count basis (either US_NASD_30_360 or European_30_360).

Examples:
    Days360(#1/1/96, #2/15/96#) = 44
    Days360(#1/1/96, #2/15/96#, True) = 44
    Days360(#1/1/96, #3/15/96#) = 74
    Days360(#1/1/96, #3/15/96#) = 74
    Days360(#2/28/96, #5/31/96#) = 93
    Days360(#2/28/96, #5/31/96#, True) = 92
See the Days360Verify Subroutine for more examples of this Function.
See also:
    DaysBetweenDates Function
    CouponDaysBeforeSettlement Function
    CouponDaysAfterSettlement Function
    CouponDays Function
    Days360Test Subroutine
    Days360Verify Subroutine
    Days360ExcelTest Subroutine
    DAYS360 Function (Microsoft Excel)
vFm: The beginning (first day) of the date interval. Function returns Null if vFm is Null or cannot be interpreted as a Date. The time component of vFm (if any) is ignored.
vTo: The end (last day) of the date interval. Function returns Null if vTo is Null or cannot be interpreted as a Date. The time component of vTo (if any) is ignored.
vEuroMethod: Optional True or False value. True if the European 30/360 day count basis should be used, and False if the US NASD 30/360 day count basis should be used. vEuroMethod defaults to False (use the US NASD 30/360 day count basis) if it is missing or Null or cannot be interpreted as a Boolean value.
vExcelVersion: Optional True or False value. True if the function should return the exact same results as the Microsoft Excel DAYS360 function, and False if it should use the Securities Industy Association definition of the 30/360 day count basis. vExcelVersion defaults to False (use the SIA definition for the US NASD 30/360 day count basis) if it is missing or Null or cannot be interpreted as a Boolean value.
Note: This function returns the exact same results as the Microsoft Excel DAYS360 function when the vExcelVersion argument is True. When the vExcelVersion argument is False, this function and the Excel Days360 function differ on the following dates: (This is the output of the Days360ExcelTest Subroutine.)
                              vEuro vExcelVersion
        vFm          vTo      Method False   True
    #02/28/1991# #02/28/1991# False      0     -2
    #02/28/1991# #02/29/1992# False    360    359
    #02/28/1991# #02/28/1993# False    720    718
    #02/28/1991# #02/28/1994# False  1,080  1,078
    #02/28/1991# #02/28/1995# False  1,440  1,438
    #02/28/1991# #02/29/1996# False  1,800  1,799
    #02/28/1991# #02/28/1997# False  2,160  2,158
    #02/29/1992# #02/28/1991# False   -360   -362
    #02/29/1992# #02/29/1992# False      0     -1
    #02/29/1992# #02/28/1993# False    360    358
    #02/29/1992# #02/28/1994# False    720    718
    #02/29/1992# #02/28/1995# False  1,080  1,078
    #02/29/1992# #02/29/1996# False  1,440  1,439
    #02/29/1992# #02/28/1997# False  1,800  1,798
    #02/28/1993# #02/28/1991# False   -720   -722
    #02/28/1993# #02/29/1992# False   -360   -361
    #02/28/1993# #02/28/1993# False      0     -2
    #02/28/1993# #02/28/1994# False    360    358
    #02/28/1993# #02/28/1995# False    720    718
    #02/28/1993# #02/29/1996# False  1,080  1,079
    #02/28/1993# #02/28/1997# False  1,440  1,438
    #02/28/1994# #02/28/1991# False -1,080 -1,082
    #02/28/1994# #02/29/1992# False   -720   -721
    #02/28/1994# #02/28/1993# False   -360   -362
    #02/28/1994# #02/28/1994# False      0     -2
    #02/28/1994# #02/28/1995# False    360    358
    #02/28/1994# #02/29/1996# False    720    719
    #02/28/1994# #02/28/1997# False  1,080  1,078
    #02/28/1995# #02/28/1991# False -1,440 -1,442
    #02/28/1995# #02/29/1992# False -1,080 -1,081
    #02/28/1995# #02/28/1993# False   -720   -722
    #02/28/1995# #02/28/1994# False   -360   -362
    #02/28/1995# #02/28/1995# False      0     -2
    #02/28/1995# #02/29/1996# False    360    359
    #02/28/1995# #02/28/1997# False    720    718
    #02/29/1996# #02/28/1991# False -1,800 -1,802
    #02/29/1996# #02/29/1992# False -1,440 -1,441
    #02/29/1996# #02/28/1993# False -1,080 -1,082
    #02/29/1996# #02/28/1994# False   -720   -722
    #02/29/1996# #02/28/1995# False   -360   -362
    #02/29/1996# #02/29/1996# False      0     -1
    #02/29/1996# #02/28/1997# False    360    358
    #02/28/1997# #02/28/1991# False -2,160 -2,162
    #02/28/1997# #02/29/1992# False -1,800 -1,801
    #02/28/1997# #02/28/1993# False -1,440 -1,442
    #02/28/1997# #02/28/1994# False -1,080 -1,082
    #02/28/1997# #02/28/1995# False   -720   -722
    #02/28/1997# #02/29/1996# False   -360   -361
    #02/28/1997# #02/28/1997# False      0     -2
v2.0 Addition: This function is new to this version of Entisoft Tools.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.