BDE 4.14.0 Production release
|
Provide stateless functions for the NL/365 convention.
This component provides a struct
, bbldc::BasicNl365
, 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 NL/365 day-count convention. In this day-count convention, we simply measure the number of non-leap days occurring in a time period, and to calculate years, divide that by 365. Note that this means the number of years between January 1, 2004 and January 1, 2005 is 1.0. No end-of-month rule adjustments are made.
This section illustrates intended use of this component.
The following snippets of code illustrate how to use bbldc::BasicNl365
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: