#include <timestamp.h>
Public Member Functions | |
void | add (int32 days, int32 hours=0, int32 mins=0, int32 secs=0, int32 msecs=0) |
void | add (const TimeStamp &ts) |
void | changeTimezone (TimeZone tz) |
Shifts this timestamp moving the old timezone into the new one. | |
virtual FalconData * | clone () const |
int32 | compare (const TimeStamp &ts) const |
void | copy (const TimeStamp &ts) |
void | currentTime () |
int16 | dayOfWeek () const |
Gets the day of week. | |
int16 | dayOfYear () const |
void | distance (const TimeStamp &ts) |
void | fromLongFormat (int64 lf) |
void | fromSystemTime (const SystemTime &st) |
virtual void | gcMark (uint32 mark) |
void | getTZDisplacement (int16 &hours, int16 &minutes) const |
bool | isLeapYear () const |
bool | isValid () const |
bool | operator!= (const TimeStamp &ts) const |
TimeStamp & | operator+= (const TimeStamp &ts) |
TimeStamp & | operator-= (const TimeStamp &ts) |
bool | operator< (const TimeStamp &ts) const |
bool | operator<= (const TimeStamp &ts) const |
TimeStamp & | operator= (const TimeStamp &ts) |
bool | operator== (const TimeStamp &ts) const |
bool | operator> (const TimeStamp &ts) const |
bool | operator>= (const TimeStamp &ts) const |
TimeStamp (int64 lfmt) | |
TimeStamp (const TimeStamp &ts) | |
TimeStamp (int16 y=0, int16 M=0, int16 d=0, int16 h=0, int16 m=0, int16 s=0, int16 ms=0, TimeZone tz=tz_NONE) | |
int64 | toLongFormat () const |
String | toRFC2822 (bool bSemantic=false, bool bDst=false) const |
Convert this timestamp to RFC2822 format. | |
bool | toRFC2822 (String &target, bool bSemantic=false, bool bDst=false) const |
Convert this timestamp to RFC2822 format. | |
bool | toString (String &target, const String &fmt) const |
void | toString (String &target) const |
~TimeStamp () | |
Static Public Member Functions | |
static bool | fromRFC2822 (TimeStamp &target, const char *source) |
Parse a RFC2822 date format and configure the given timestamp. | |
static bool | fromRFC2822 (TimeStamp &target, const String &source) |
Parse a RFC2822 date format and configure the given timestamp. | |
static int16 | getRFC2822_Month (const char *name) |
Return numeric month from a RFC2822 format month name. | |
static const char * | getRFC2822_MonthName (int16 wd) |
Gets a RFC 2822 timestamp compliant month name. | |
static int16 | getRFC2822_WeekDay (const char *name) |
Return numeric weekday from a RFC2822 format weekday name. | |
static const char * | getRFC2822_WeekDayName (int16 wd) |
Gets a RFC 2822 timestamp compliant weekday name. | |
static TimeZone | getRFC2822_Zone (const char *csZoneName) |
Return a timezone given a RCF2822 timezone name. | |
static const char * | getRFC2822_ZoneName (TimeZone tz, bool bSemantic=false, bool bDst=false) |
Return a RCF2822 timezone name. | |
static void | getTZDisplacement (TimeZone tz, int16 &hours, int16 &minutes) |
Get a timezone displacement. | |
Public Attributes | |
int16 | m_day |
int16 | m_hour |
int16 | m_minute |
int16 | m_month |
int16 | m_msec |
int16 | m_second |
TimeZone | m_timezone |
int16 | m_year |
Friends | |
void | Sys::Time::timestampFromSystemTime (const SystemTime &sys_time, TimeStamp &ts) |
This class is both used as a system independent time accounting object and as a internal object for the TimeStamp falcon core object.
Falcon::TimeStamp::TimeStamp | ( | int16 | y = 0 , |
|
int16 | M = 0 , |
|||
int16 | d = 0 , |
|||
int16 | h = 0 , |
|||
int16 | m = 0 , |
|||
int16 | s = 0 , |
|||
int16 | ms = 0 , |
|||
TimeZone | tz = tz_NONE | |||
) | [inline] |
Falcon::TimeStamp::TimeStamp | ( | const TimeStamp & | ts | ) | [inline] |
Falcon::TimeStamp::TimeStamp | ( | int64 | lfmt | ) | [inline] |
Falcon::TimeStamp::~TimeStamp | ( | ) | [inline] |
void Falcon::TimeStamp::add | ( | int32 | days, | |
int32 | hours = 0 , |
|||
int32 | mins = 0 , |
|||
int32 | secs = 0 , |
|||
int32 | msecs = 0 | |||
) |
void Falcon::TimeStamp::add | ( | const TimeStamp & | ts | ) |
Referenced by Falcon::operator+().
void Falcon::TimeStamp::changeTimezone | ( | TimeZone | tz | ) |
Shifts this timestamp moving the old timezone into the new one.
virtual FalconData* Falcon::TimeStamp::clone | ( | ) | const [virtual] |
Implements Falcon::FalconData.
void Falcon::TimeStamp::copy | ( | const TimeStamp & | ts | ) |
void Falcon::TimeStamp::currentTime | ( | ) |
int16 Falcon::TimeStamp::dayOfWeek | ( | ) | const |
Gets the day of week.
Week starting on monday, 0 based.
int16 Falcon::TimeStamp::dayOfYear | ( | ) | const |
void Falcon::TimeStamp::distance | ( | const TimeStamp & | ts | ) |
Referenced by Falcon::operator-().
void Falcon::TimeStamp::fromLongFormat | ( | int64 | lf | ) |
static bool Falcon::TimeStamp::fromRFC2822 | ( | TimeStamp & | target, | |
const char * | source | |||
) | [static] |
Parse a RFC2822 date format and configure the given timestamp.
Parse a RFC2822 date format and configure the given timestamp.
void Falcon::TimeStamp::fromSystemTime | ( | const SystemTime & | st | ) | [inline] |
References Falcon::Sys::Time::timestampFromSystemTime().
virtual void Falcon::TimeStamp::gcMark | ( | uint32 | mark | ) | [inline, virtual] |
Implements Falcon::FalconData.
static int16 Falcon::TimeStamp::getRFC2822_Month | ( | const char * | name | ) | [static] |
Return numeric month from a RFC2822 format month name.
static const char* Falcon::TimeStamp::getRFC2822_MonthName | ( | int16 | wd | ) | [static] |
Gets a RFC 2822 timestamp compliant month name.
static int16 Falcon::TimeStamp::getRFC2822_WeekDay | ( | const char * | name | ) | [static] |
Return numeric weekday from a RFC2822 format weekday name.
static const char* Falcon::TimeStamp::getRFC2822_WeekDayName | ( | int16 | wd | ) | [static] |
Gets a RFC 2822 timestamp compliant weekday name.
static TimeZone Falcon::TimeStamp::getRFC2822_Zone | ( | const char * | csZoneName | ) | [static] |
Return a timezone given a RCF2822 timezone name.
csZoneName | The timezone name. |
static const char* Falcon::TimeStamp::getRFC2822_ZoneName | ( | TimeZone | tz, | |
bool | bSemantic = false , |
|||
bool | bDst = false | |||
) | [static] |
Return a RCF2822 timezone name.
tz | The timezone. | |
bSemantic | return semantic zone names instead of + displacements when available. | |
bDst | Get the DST version of the semantic zone. |
static void Falcon::TimeStamp::getTZDisplacement | ( | TimeZone | tz, | |
int16 & | hours, | |||
int16 & | minutes | |||
) | [static] |
Get a timezone displacement.
tz | the timezone. | |
hours | hours the displacement in hours | |
minutes | minutes the displacement in minutes |
bool Falcon::TimeStamp::isLeapYear | ( | ) | const |
bool Falcon::TimeStamp::isValid | ( | ) | const |
bool Falcon::TimeStamp::operator!= | ( | const TimeStamp & | ts | ) | const [inline] |
bool Falcon::TimeStamp::operator< | ( | const TimeStamp & | ts | ) | const [inline] |
bool Falcon::TimeStamp::operator<= | ( | const TimeStamp & | ts | ) | const [inline] |
bool Falcon::TimeStamp::operator== | ( | const TimeStamp & | ts | ) | const [inline] |
bool Falcon::TimeStamp::operator> | ( | const TimeStamp & | ts | ) | const [inline] |
bool Falcon::TimeStamp::operator>= | ( | const TimeStamp & | ts | ) | const [inline] |
int64 Falcon::TimeStamp::toLongFormat | ( | ) | const |
String Falcon::TimeStamp::toRFC2822 | ( | bool | bSemantic = false , |
|
bool | bDst = false | |||
) | const [inline] |
Convert this timestamp to RFC2822 format.
bSemantic | return semantic zone names instead of + displacements when available. | |
bDst | Get the DST version of the semantic zone. |
bool Falcon::TimeStamp::toRFC2822 | ( | String & | target, | |
bool | bSemantic = false , |
|||
bool | bDst = false | |||
) | const |
Convert this timestamp to RFC2822 format.
target | The string that will receive the converted date, or "?" in case it doesn't work. | |
bSemantic | return semantic zone names instead of + displacements when available. | |
bDst | Get the DST version of the semantic zone. |
void Falcon::TimeStamp::toString | ( | String & | target | ) | const |
void Sys::Time::timestampFromSystemTime | ( | const SystemTime & | sys_time, | |
TimeStamp & | ts | |||
) | [friend] |