BTimeStamp Class Reference

#include <BTimeStamp.h>

List of all members.

Public Member Functions

 BTimeStamp ()
 BTimeStamp (int year, int month=1, int day=1, int hour=0, int minute=0, int second=0, int microsecond=0)
 BTimeStamp (BString str)
 ~BTimeStamp ()
void clear ()
 Clear the date/time.
void setFirst ()
 Set the first date available.
void setLast ()
 Set the last date available.
void set (time_t time, int microSeconds)
 Set time using Unix time (seconds from 1970-01-01).
void set (int year=0, int month=1, int day=1, int hour=0, int minute=0, int second=0, int microsecond=0)
void set (const BTimeStampMs &timeStamp)
 Set the timeStamp to given MS time stamp.
void setYDay (int year=0, int yday=0, int hour=0, int minute=0, int second=0, int microsecond=0)
void setTime (int hour=0, int minute=0, int second=0, int microsecond=0)
void setNow ()
 Set the timeStamp to now.
int year ()
int yday ()
int month ()
int day ()
int hour ()
int minute ()
int second ()
int microSecond ()
void getDate (int &year, int &mon, int &day)
BString getString (BString separator="T")
 Get the time as an ISO date/time string.
BError setString (BString dateTime)
 Set the time from an ISO date/time.
BString getStringNoMs (BString separator="T")
 Get the time as an ISO date/time string without microseconds.
BString getStringFormatted (BString format)
 Gets the time in a string form as per the format. Format syntax as per strftime().
void addMilliSeconds (int milliSeconds)
 Add the given number of milli seconds. This should be less that a year.
void addMicroSeconds (int microSeconds)
 Add the given number of micro seconds. This should be less that a year.
void addSeconds (int seconds)
 Add the given number of seconds. This should be less that a year.
uint32_t getYearSeconds ()
 Get number of seconds within the year.
uint64_t getYearMicroSeconds ()
 Get number of micro seconds within the year.
int isSet ()
int compare (const BTimeStamp &timeStamp) const
 Compare two dates.
 operator BString ()
BTimeStampoperator= (const BTimeStampMs &timeStamp)
int operator== (const BTimeStamp &timeStamp) const
int operator!= (const BTimeStamp &timeStamp) const
int operator> (const BTimeStamp &timeStamp) const
int operator>= (const BTimeStamp &timeStamp) const
int operator< (const BTimeStamp &timeStamp) const
int operator<= (const BTimeStamp &timeStamp) const

Static Public Member Functions

static int isLeap (int year)
static BUInt64 difference (BTimeStamp t2, BTimeStamp t1)

Public Attributes

uint16_t oyear
 Year (0 .. 65535).
uint16_t oyday
 Day in year (0 .. 365).
uint8_t ohour
 Hour (0 .. 23).
uint8_t ominute
 Minute (0 .. 59).
uint8_t osecond
 Second (0 .. 59).
uint8_t ospare
 Padding.
uint32_t omicroSecond
 MicroSecond (0 .. 999999).


Constructor & Destructor Documentation

BTimeStamp::BTimeStamp (  ) 

BTimeStamp::BTimeStamp ( int  year,
int  month = 1,
int  day = 1,
int  hour = 0,
int  minute = 0,
int  second = 0,
int  microsecond = 0 
)

BTimeStamp::BTimeStamp ( BString  str  ) 

BTimeStamp::~BTimeStamp (  ) 


Member Function Documentation

void BTimeStamp::addMicroSeconds ( int  microSeconds  ) 

Add the given number of micro seconds. This should be less that a year.

void BTimeStamp::addMilliSeconds ( int  milliSeconds  ) 

Add the given number of milli seconds. This should be less that a year.

void BTimeStamp::addSeconds ( int  seconds  ) 

Add the given number of seconds. This should be less that a year.

void BTimeStamp::clear (  ) 

Clear the date/time.

int BTimeStamp::compare ( const BTimeStamp timeStamp  )  const

Compare two dates.

int BTimeStamp::day (  ) 

BUInt64 BTimeStamp::difference ( BTimeStamp  t2,
BTimeStamp  t1 
) [static]

void BTimeStamp::getDate ( int &  year,
int &  mon,
int &  day 
)

BString BTimeStamp::getString ( BString  separator = "T"  ) 

Get the time as an ISO date/time string.

BString BTimeStamp::getStringFormatted ( BString  format  ) 

Gets the time in a string form as per the format. Format syntax as per strftime().

BString BTimeStamp::getStringNoMs ( BString  separator = "T"  ) 

Get the time as an ISO date/time string without microseconds.

uint64_t BTimeStamp::getYearMicroSeconds (  ) 

Get number of micro seconds within the year.

uint32_t BTimeStamp::getYearSeconds (  ) 

Get number of seconds within the year.

int BTimeStamp::hour (  ) 

int BTimeStamp::isLeap ( int  year  )  [static]

int BTimeStamp::isSet (  )  [inline]

int BTimeStamp::microSecond (  ) 

int BTimeStamp::minute (  ) 

int BTimeStamp::month (  ) 

BTimeStamp::operator BString (  )  [inline]

int BTimeStamp::operator!= ( const BTimeStamp timeStamp  )  const [inline]

int BTimeStamp::operator< ( const BTimeStamp timeStamp  )  const [inline]

int BTimeStamp::operator<= ( const BTimeStamp timeStamp  )  const [inline]

BTimeStamp& BTimeStamp::operator= ( const BTimeStampMs timeStamp  )  [inline]

int BTimeStamp::operator== ( const BTimeStamp timeStamp  )  const [inline]

int BTimeStamp::operator> ( const BTimeStamp timeStamp  )  const [inline]

int BTimeStamp::operator>= ( const BTimeStamp timeStamp  )  const [inline]

int BTimeStamp::second (  ) 

void BTimeStamp::set ( const BTimeStampMs timeStamp  ) 

Set the timeStamp to given MS time stamp.

void BTimeStamp::set ( int  year = 0,
int  month = 1,
int  day = 1,
int  hour = 0,
int  minute = 0,
int  second = 0,
int  microsecond = 0 
)

void BTimeStamp::set ( time_t  time,
int  microSeconds 
)

Set time using Unix time (seconds from 1970-01-01).

void BTimeStamp::setFirst (  ) 

Set the first date available.

void BTimeStamp::setLast (  ) 

Set the last date available.

void BTimeStamp::setNow (  ) 

Set the timeStamp to now.

BError BTimeStamp::setString ( BString  dateTime  ) 

Set the time from an ISO date/time.

void BTimeStamp::setTime ( int  hour = 0,
int  minute = 0,
int  second = 0,
int  microsecond = 0 
)

void BTimeStamp::setYDay ( int  year = 0,
int  yday = 0,
int  hour = 0,
int  minute = 0,
int  second = 0,
int  microsecond = 0 
)

int BTimeStamp::yday (  ) 

int BTimeStamp::year (  ) 


Member Data Documentation

uint8_t BTimeStamp::ohour

Hour (0 .. 23).

uint32_t BTimeStamp::omicroSecond

MicroSecond (0 .. 999999).

uint8_t BTimeStamp::ominute

Minute (0 .. 59).

uint8_t BTimeStamp::osecond

Second (0 .. 59).

uint8_t BTimeStamp::ospare

Padding.

uint16_t BTimeStamp::oyday

Day in year (0 .. 365).

uint16_t BTimeStamp::oyear

Year (0 .. 65535).


The documentation for this class was generated from the following files:
Generated on Tue Mar 2 09:26:42 2010 for LibBeamApi by  doxygen 1.4.7