BDE 4.14.0 Production release
|
Provide stateless functions for the Actual/360 convention.
This component provides a struct
, bbldc::BasicActual360
, that serves as a namespace for defining a suite of date-related functions used to compute the day count and the year fraction between two dates as per the Actual/360 day-count convention. In this day-count convention, we simply measure the number of days occurring in a time period, and to calculate years, divide that by 360. Note that this means the number of years between January 1, 2005 and January 1, 2006 is about 1.0139. No end-of-month rule adjustments are made. Given beginDate
and endDate
:
This section illustrates intended use of this component.
The following snippets of code illustrate how to use bbldc::BasicActual360
methods. First, create four bdlt::Date
variables:
Then, compute the day count between some pairs of these dates:
Finally, compute the year fraction between some of the dates: