Rcpp Version 0.9.10
Rcpp::Date Class Reference

#include <Date.h>

List of all members.

Public Member Functions

 Date ()
 Date (SEXP s)
 Date (const int &dt)
 Date (const std::string &s, const std::string &fmt="%Y-%m-%d")
 Date (const unsigned int &m, const unsigned int &d, const unsigned int &y)
 Date (const Date &copy)
 ~Date ()
int getDate (void) const
int getDay () const
int getMonth () const
int getYear () const
int getWeekday () const
int getYearday () const
Dateoperator= (const Date &newdate)

Static Public Attributes

static const unsigned int QLtoJan1970Offset = 25569
static const unsigned int baseYear = 1900

Private Member Functions

void update_tm ()
double mktime00 (struct tm &tm) const

Private Attributes

int m_d
struct tm m_tm

Friends

Date operator+ (const Date &date, int offset)
int operator- (const Date &date1, const Date &date2)
bool operator< (const Date &date1, const Date &date2)
bool operator> (const Date &date1, const Date &date2)
bool operator== (const Date &date1, const Date &date2)
bool operator>= (const Date &date1, const Date &date2)
bool operator<= (const Date &date1, const Date &date2)
bool operator!= (const Date &date1, const Date &date2)

Detailed Description

Definition at line 29 of file Date.h.


Constructor & Destructor Documentation

Rcpp::Date::Date ( )

Definition at line 40 of file Date.cpp.

References m_d, and update_tm().

Here is the call graph for this function:

Rcpp::Date::Date ( SEXP  s)

Definition at line 45 of file Date.cpp.

References m_d, and update_tm().

Here is the call graph for this function:

Rcpp::Date::Date ( const int &  dt)

Definition at line 50 of file Date.cpp.

References m_d, and update_tm().

Here is the call graph for this function:

Rcpp::Date::Date ( const std::string &  s,
const std::string &  fmt = "%Y-%m-%d" 
)

Definition at line 55 of file Date.cpp.

References m_d, and update_tm().

Here is the call graph for this function:

Rcpp::Date::Date ( const unsigned int &  m,
const unsigned int &  d,
const unsigned int &  y 
)

Definition at line 62 of file Date.cpp.

References baseYear, m_d, m_tm, and mktime00().

Here is the call graph for this function:

Rcpp::Date::Date ( const Date copy)

Definition at line 81 of file Date.cpp.

References m_d, and m_tm.

Rcpp::Date::~Date ( ) [inline]

Definition at line 37 of file Date.h.


Member Function Documentation

int Rcpp::Date::getDate ( void  ) const [inline]

Definition at line 39 of file Date.h.

References m_d.

Referenced by Rcpp::wrap().

int Rcpp::Date::getDay ( ) const [inline]

Definition at line 45 of file Date.h.

References m_tm.

int Rcpp::Date::getMonth ( ) const [inline]

Definition at line 46 of file Date.h.

References m_tm.

int Rcpp::Date::getWeekday ( ) const [inline]

Definition at line 48 of file Date.h.

References m_tm.

int Rcpp::Date::getYear ( ) const [inline]

Definition at line 47 of file Date.h.

References m_tm.

int Rcpp::Date::getYearday ( ) const [inline]

Definition at line 49 of file Date.h.

References m_tm.

double Rcpp::Date::mktime00 ( struct tm tm) const [private]

Definition at line 102 of file Date.cpp.

References baseYear, days_in_year, i, and isleap.

Referenced by Date().

Date & Rcpp::Date::operator= ( const Date newdate)

Definition at line 86 of file Date.cpp.

References m_d, and m_tm.

void Rcpp::Date::update_tm ( ) [private]

Definition at line 94 of file Date.cpp.

References Rcpp::gmtime_(), m_d, and m_tm.

Referenced by Date().

Here is the call graph for this function:


Friends And Related Function Documentation

bool operator!= ( const Date date1,
const Date date2 
) [friend]

Definition at line 160 of file Date.cpp.

Date operator+ ( const Date date,
int  offset 
) [friend]

Definition at line 145 of file Date.cpp.

int operator- ( const Date date1,
const Date date2 
) [friend]

Definition at line 154 of file Date.cpp.

bool operator< ( const Date date1,
const Date date2 
) [friend]

Definition at line 155 of file Date.cpp.

bool operator<= ( const Date date1,
const Date date2 
) [friend]

Definition at line 159 of file Date.cpp.

bool operator== ( const Date date1,
const Date date2 
) [friend]

Definition at line 157 of file Date.cpp.

bool operator> ( const Date date1,
const Date date2 
) [friend]

Definition at line 156 of file Date.cpp.

bool operator>= ( const Date date1,
const Date date2 
) [friend]

Definition at line 158 of file Date.cpp.


Member Data Documentation

const unsigned int Rcpp::Date::baseYear = 1900 [static]

Definition at line 52 of file Date.h.

Referenced by Date(), and mktime00().

struct tm Rcpp::Date::m_tm [private]
const unsigned int Rcpp::Date::QLtoJan1970Offset = 25569 [static]

Definition at line 51 of file Date.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Defines