dlr::utilities::Date Class Reference

As you'd expect, the Date class represents a date, like 2003-03-15. More...

#include <date.h>

List of all members.

Public Member Functions

 Date ()
 The default constructor initializes to the imaginary date 0000-00-00.
 Date (const std::string &isoString)
 This constructor sets the date from ISO string "yyyy-mm-dd".
 Date (size_t year, size_t month, size_t day)
 This constructor sets the date explicitly.
 Date (const Date &source)
 The copy constructor deep copies its argument.
 ~Date ()
 Destructor.
size_t day () const
 The function returns the day.
size_t month () const
 The function returns the month.
void setDay (size_t day)
 This function explicitly sets the day.
void setISODate (const std::string &isoString)
 Set from an ISO date string.
void setMonth (size_t month)
 This function explicitly sets the month.
void setYear (size_t year)
 This function explicitly sets the year.
size_t year () const
 The function returns the year.


Detailed Description

As you'd expect, the Date class represents a date, like 2003-03-15.

Note that the format is yyyy-mm-dd.

Definition at line 26 of file date.h.


Constructor & Destructor Documentation

dlr::utilities::Date::Date (  )  [inline]

The default constructor initializes to the imaginary date 0000-00-00.

Definition at line 32 of file date.h.

dlr::utilities::Date::Date ( const std::string &  isoString  )  [inline]

This constructor sets the date from ISO string "yyyy-mm-dd".

Parameters:
isoString This argument specifies the date.

Definition at line 41 of file date.h.

References setISODate().

dlr::utilities::Date::Date ( size_t  year,
size_t  month,
size_t  day 
) [inline]

This constructor sets the date explicitly.

Parameters:
year This argument specifies the year.
month This argument specifies the month.
day This argument specifies the day.

Definition at line 53 of file date.h.

dlr::utilities::Date::Date ( const Date source  )  [inline]

The copy constructor deep copies its argument.

Parameters:
source This argument is the Date instance to be copied.

Definition at line 62 of file date.h.

dlr::utilities::Date::~Date (  )  [inline]

Destructor.

Definition at line 70 of file date.h.


Member Function Documentation

size_t dlr::utilities::Date::day (  )  const [inline]

The function returns the day.

Returns:
The return value is the day.

Definition at line 79 of file date.h.

Referenced by dlr::utilities::operator<(), dlr::utilities::operator<<(), and dlr::utilities::operator==().

size_t dlr::utilities::Date::month (  )  const [inline]

The function returns the month.

Returns:
The return value is the month.

Definition at line 88 of file date.h.

Referenced by dlr::utilities::operator<(), dlr::utilities::operator<<(), and dlr::utilities::operator==().

void dlr::utilities::Date::setDay ( size_t  day  )  [inline]

This function explicitly sets the day.

Parameters:
day This argument is the specified day.

Definition at line 97 of file date.h.

void dlr::utilities::Date::setISODate ( const std::string &  isoString  ) 

Set from an ISO date string.

Parameters:
isoString This argument specifies the date.

Definition at line 27 of file date.cpp.

References DLR_THROW, and dlr::utilities::replaceString().

Referenced by Date().

void dlr::utilities::Date::setMonth ( size_t  month  )  [inline]

This function explicitly sets the month.

Parameters:
month This argument is the specified month.

Definition at line 115 of file date.h.

void dlr::utilities::Date::setYear ( size_t  year  )  [inline]

This function explicitly sets the year.

Parameters:
year This argument is the specified year.

Definition at line 124 of file date.h.

size_t dlr::utilities::Date::year (  )  const [inline]

The function returns the year.

Returns:
The return value is the year.

Definition at line 133 of file date.h.

Referenced by dlr::utilities::operator<(), dlr::utilities::operator<<(), and dlr::utilities::operator==().


The documentation for this class was generated from the following files:
Generated on Mon Jul 9 20:34:22 2007 for dlrLibs Utility Libraries by  doxygen 1.5.2