#include <date.hh>
Inheritance diagram for mpcl::text::IDate:

Public Types | |
| enum | EDateType |
| Date types. | |
Public Methods | |
| IDate (const int kiYEAR, const int kiMONTH, const int kiDAY, const int kiHOUR=0, const int kiMINUTES=0, const int kiSECONDS=0) | |
| IDate (const EDateType keDATE_TYPE=eNow) throw (TConstraintException) | |
| IDate & | addSeconds (const int kiSECONDS) throw (TConstraintException) |
| IDate & | addMinutes (const int kiMINUTES) |
| IDate & | addHours (const int kiHOURS) |
| IDate & | addDays (const int kiDAYS) |
| void | set (const int kiYEAR, const int kiMONTH, const int kiDAY, const int kiHOUR=0, const int kiMINUTES=0, const int kiSECONDS=0) throw (TConstraintException) |
| bool | empty (void) const |
| Tells if a date is empty. | |
| virtual TString | get (const char *pkcDATE_FORMAT) const=0 |
| TString | get (const TString &rkyDATE_FORMAT) const |
| bool | in (const IDate &rktBEGIN_DATE, const IDate &rktEND_DATE) const |
| bool | operator== (const IDate &rktDATE) const throw (TConstraintException) |
| bool | operator< (const IDate &rktDATE) const throw (TConstraintException) |
| TTimeInterval | operator- (const IDate &rktDATE) const |
Protected Attributes | |
| time_t | tSecondsFromEpoch |
| Total number of seconds from the Epoch. | |
Static Protected Attributes | |
| const int | _kiMaxFormattedDate = 517 |
| Constants. | |
Definition at line 103 of file date.hh.
|
||||||||||||||||||||||||||||
|
Builds a new instance. The base date must be supplied but the hour is optional.
Definition at line 137 of file date.hh. References set(), and tSecondsFromEpoch. |
|
|
Builds a new instance.
|
|
|
Adds a specified number of days.
Definition at line 195 of file date.hh. References addSeconds(). |
|
|
Adds a specified number of hours.
Definition at line 186 of file date.hh. References addSeconds(). |
|
|
Adds a specified number of minutes.
Definition at line 177 of file date.hh. References addSeconds(). |
|
|
Adds a specified number of seconds.
Definition at line 159 of file date.hh. References empty(), and tSecondsFromEpoch. Referenced by addDays(), addHours(), and addMinutes(). |
|
|
Gets the current date in an specified strftime-like format.
Definition at line 241 of file date.hh. References get(), and mpcl::text::TString. |
|
|
Gets the current date in an specified strftime-like format.
Implemented in mpcl::text::TGmtDate, and mpcl::text::TLocalDate. Referenced by get(). |
|
||||||||||||
|
Returns true if this instance is between rktBEGIN_SQL_DATE and rktEND_SQL_DATE dates.
|
|
|
Gets the difference in seconds between two IDate objects.
Definition at line 315 of file date.hh. References tSecondsFromEpoch. |
|
|
Returns true if second dates are previous than the first.
Definition at line 286 of file date.hh. References empty(), and tSecondsFromEpoch. |
|
|
Returns true if two dates are equal.
Definition at line 265 of file date.hh. References empty(), and tSecondsFromEpoch. |
|
||||||||||||||||||||||||||||
|
Sets a new date.
Definition at line 72 of file date.cc. Referenced by IDate(). |
1.2.18