Date Class Reference

Store and operate on date (time_t). More...

#include <Date.h>

List of all members.

Public Member Functions

 Date (time_t date_r=0)
 Date (const std::string &seconds_r)
 operator time_t () const
Dateoperator+= (const time_t rhs)
Dateoperator-= (const time_t rhs)
Dateoperator *= (const time_t rhs)
Dateoperator/= (const time_t rhs)
Dateoperator++ ()
Dateoperator-- ()
Date operator++ (int)
Date operator-- (int)
std::string form (const std::string &format) const
std::string asString () const

Static Public Member Functions

static time_t now ()
static std::string form (const std::string &format, time_t tval_r)
static time_t fromSECONDS (const std::string &str_r)
static std::string toSECONDS (time_t tval_r)

Private Attributes

time_t _date

Friends

std::ostream & operator<< (std::ostream &str, const Date &obj)


Detailed Description

Store and operate on date (time_t).

Constructor & Destructor Documentation

Date::Date ( time_t  date_r = 0  )  [inline]

Constructor

Date::Date ( const std::string &  seconds_r  )  [inline]


Member Function Documentation

static time_t Date::now (  )  [inline, static]

Return the current time.

static std::string Date::form ( const std::string &  format,
time_t  tval_r 
) [static]

Return string representation of date according to format. See 'man strftime' (which is used internaly) for valid conversion specifiers in format.

Retruns an empty string on illegal format.

static time_t Date::fromSECONDS ( const std::string &  str_r  )  [static]

Convert from string representation of calendar time in numeric form (like "1029255142").

static std::string Date::toSECONDS ( time_t  tval_r  )  [static]

Convert to string representation of calendar time in numeric form (like "1029255142").

Date::operator time_t (  )  const [inline]

Conversion to time_t

Date& Date::operator+= ( const time_t  rhs  )  [inline]

Date& Date::operator-= ( const time_t  rhs  )  [inline]

Date& Date::operator *= ( const time_t  rhs  )  [inline]

Date& Date::operator/= ( const time_t  rhs  )  [inline]

Date& Date::operator++ (  )  [inline]

Date& Date::operator-- (  )  [inline]

Date Date::operator++ ( int   )  [inline]

Date Date::operator-- ( int   )  [inline]

std::string Date::form ( const std::string &  format  )  const [inline]

Member version of 'static form'.

std::string Date::asString (  )  const

Default string representation of Date. The preferred date and time representation for the current locale.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  str,
const Date obj 
) [friend]

Write asString.


Member Data Documentation

time_t Date::_date [private]

Calendar time. The number of seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC).


The documentation for this class was generated from the following file:
Generated on Fri Sep 21 22:35:03 2007 for liby2util by  doxygen 1.5.3