Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

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

time_t now ()
std::string form (const std::string &format, time_t tval_r)
time_t fromSECONDS (const std::string &str_r)
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

std::string Date::asString  )  const
 

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

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

Member version of 'static form'.

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.

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

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

time_t Date::now  )  [inline, static]
 

Return the current time.

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

Date::operator time_t  )  const [inline]
 

Conversion to time_t

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

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

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

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

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

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

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

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

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


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 files:
Generated on Thu Feb 23 23:56:10 2006 for liby2util by doxygen 1.3.6