The class encapsulates the 30/360 US year fraction convention. More...
#include <US30360.hpp>
Public Member Functions | |
virtual double | operator() (const Date &, const Date &) const |
Calculates year fraction. More... | |
virtual US30360 * | clone () const |
Virtual copy constructor. More... | |
virtual std::string | info () const |
Name of a class. More... | |
Public Member Functions inherited from julian::YearFraction | |
YearFraction () | |
Constructor. More... | |
virtual | ~YearFraction () |
Destructor. More... | |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &, const unsigned int) |
interface used by Boost serialization library More... | |
Friends | |
class | boost::serialization::access |
Detailed Description
The class encapsulates the 30/360 US year fraction convention.
According to 30/360 US convention the year fraction is calculated using following formula:
where:
- is number of years in ,
- is number of months in ,
- is number of days in .
Additionally the following adjustment is applied:
- If D_1 is 31, then change D_1 to 30.
- If D_2 is 31 and D_1 is 30 or 31, then change D_2 to 30
Member Function Documentation
|
virtual |
Virtual copy constructor.
Virtual copy constructor of the US30360 class
Implements julian::YearFraction.
|
virtual |
Name of a class.
Method returns string that containing information about class.
Implements julian::YearFraction.
Calculates year fraction.
According to 30/360 US convention the year fraction is calculated using following formula:
where:
- is number of years in ,
- is number of months in ,
- is number of days in .
Additionally the following adjustment is applied:
- If D_1 is 31, then change D_1 to 30.
- If D_2 is 31 and D_1 is 30 or 31, then change D_2 to 30
Implements julian::YearFraction.
|
inlineprivate |
interface used by Boost serialization library
The documentation for this class was generated from the following files:
- C:/Unix/home/OEM/jULIAN/src/dates/yearFractions/US30360.hpp
- C:/Unix/home/OEM/jULIAN/src/dates/yearFractions/US30360.cpp