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 () const
int yday () const
int month () const
int day () const
int hour () const
int minute () const
int second () const
int microSecond () const
void getDate (int &year, int &mon, int &day) const
BString getString (BString separator="T") const
 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") const
 Get the time as an ISO date/time string without microseconds.
BString getStringFormatted (BString format) const
 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 (int64_t 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 () const
 Get number of seconds within the year.
uint64_t getYearMicroSeconds () const
 Get number of micro seconds within the year.
int isSet () const
int compare (const BTimeStamp &timeStamp) const
 Compare two dates.
 operator BString () const
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 ( int64_t  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 (  )  const

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

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

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

Get the time as an ISO date/time string.

BString BTimeStamp::getStringFormatted ( BString  format  )  const

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

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

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

uint64_t BTimeStamp::getYearMicroSeconds (  )  const

Get number of micro seconds within the year.

uint32_t BTimeStamp::getYearSeconds (  )  const

Get number of seconds within the year.

int BTimeStamp::hour (  )  const

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

int BTimeStamp::isSet (  )  const [inline]

int BTimeStamp::microSecond (  )  const

int BTimeStamp::minute (  )  const

int BTimeStamp::month (  )  const

BTimeStamp::operator BString (  )  const [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 (  )  const

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 (  )  const

int BTimeStamp::year (  )  const


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 Thu Oct 21 15:27:02 2010 for LibBeamApi by  doxygen 1.4.7