BDE 4.14.0 Production release
|
Provide stateless functions for the Actual/365.25 convention.
This component provides a struct
, bbldc::BasicActual36525
, that serves as a namespace for defining a suite of date-related functions used to compute the day count and year fraction between two dates as per the Actual/365.25 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 365.25. Note that this means the number of years between January 1, 2004 and January 1, 2005 comes out to about 1.00205. 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::BasicActual36525
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: