date.hpp File Reference

File contains definition of date class. More...

#include <stdlib.h>
#include <iostream>
#include <string>
#include <dates/timeUnit.hpp>
#include <dates/tenor.hpp>
#include <boost/serialization/export.hpp>

Go to the source code of this file.

Classes

class  julian::Date
 Class implements a date object. More...
 

Functions

std::ostream & julian::operator<< (std::ostream &os, Date &d)
 Prints date. More...
 
Date julian::operator+ (Date d, Tenor t)
 moves date forward by a tenor More...
 
Date julian::operator- (Date d, Tenor t)
 moves date backward by a tenor More...
 
bool julian::operator== (const Date &d1, const Date &d2)
 checks if dates are equal More...
 
bool julian::operator!= (const Date &d1, const Date &d2)
 checks if dates are not equal More...
 
bool julian::operator< (const Date &d1, const Date &d2)
 checks if date d1 is earlier than d2 More...
 
bool julian::operator> (const Date &d1, const Date &d2)
 checks if date d1 is later than d2 More...
 
bool julian::operator<= (const Date &d1, const Date &d2)
 checks if date d1 is not earlier than d2 More...
 
bool julian::operator>= (const Date &d1, const Date &d2)
 checks if date d1 is not later than d2 More...
 
Tenor julian::operator* (int a, TimeUnit unit_)
 creates tenor More...
 
Tenor julian::operator* (TimeUnit unit_, int a)
 creates tenor More...
 

Detailed Description

File contains definition of date class.

Function Documentation

bool julian::operator!= ( const Date d1,
const Date d2 
)
inline

checks if dates are not equal

Tenor julian::operator* ( int  a,
TimeUnit  unit_ 
)
inline

creates tenor

Tenor julian::operator* ( TimeUnit  unit_,
int  a 
)
inline

creates tenor

Date julian::operator+ ( Date  d,
Tenor  t 
)
inline

moves date forward by a tenor

Date julian::operator- ( Date  d,
Tenor  t 
)
inline

moves date backward by a tenor

bool julian::operator< ( const Date d1,
const Date d2 
)
inline

checks if date d1 is earlier than d2

std::ostream & julian::operator<< ( std::ostream &  os,
Date d 
)

Prints date.

Operator enables using std library operator << to print the date.

bool julian::operator<= ( const Date d1,
const Date d2 
)
inline

checks if date d1 is not earlier than d2

bool julian::operator== ( const Date d1,
const Date d2 
)
inline

checks if dates are equal

bool julian::operator> ( const Date d1,
const Date d2 
)
inline

checks if date d1 is later than d2

bool julian::operator>= ( const Date d1,
const Date d2 
)
inline

checks if date d1 is not later than d2