Cern
LibTmsApi 2.3.0

#include <BTime.h>

Public Member Functions

 BTime (BUInt32 t=0)
 
void set (BUInt32 seconds)
 Set the date and time.
 
void set (BUInt year, BUInt month, BUInt day, BUInt hour=0, BUInt minute=0, BUInt second=0)
 Set the date and time.
 
void setYearDay (BUInt year, BUInt yearDay, BUInt hour=0, BUInt minute=0, BUInt second=0)
 Set the date and time.
 
void getDate (BUInt &year, BUInt &month, BUInt &day) const
 Retun the date information.
 
void getTime (BUInt &hour, BUInt &minute, BUInt &second) const
 Return the time information.
 
BUInt32 getSeconds () const
 Return the number of seconds.
 
int isSet () const
 Check if set.
 
int isLeapYear ()
 Returns if a leap year.
 
void addSeconds (int seconds)
 Add the given number of seconds.
 
BString getString (BString format="isoT") const
 Gets the date/time in string format.
 
BError setString (const BString dateTime)
 Sets the date/time from string format.
 
int operator== (const BTime &time) const
 
int operator!= (const BTime &time) const
 
int operator> (const BTime &time) const
 
int operator>= (const BTime &time) const
 
int operator< (const BTime &time) const
 
int operator<= (const BTime &time) const
 
BTime operator+ (int seconds) const
 
BTimeoperator+= (int seconds)
 

Private Attributes

BUInt32 otime
 Time in seconds since 1970. range 1970-01-02 to 2106-02-07.
 

Constructor & Destructor Documentation

◆ BTime()

BTime::BTime ( BUInt32  t = 0)

Member Function Documentation

◆ addSeconds()

void BTime::addSeconds ( int  seconds)

Add the given number of seconds.

◆ getDate()

void BTime::getDate ( BUInt year,
BUInt month,
BUInt day 
) const

Retun the date information.

◆ getSeconds()

BUInt32 BTime::getSeconds ( ) const

Return the number of seconds.

◆ getString()

BString BTime::getString ( BString  format = "isoT") const

Gets the date/time in string format.

◆ getTime()

void BTime::getTime ( BUInt hour,
BUInt minute,
BUInt second 
) const

Return the time information.

◆ isLeapYear()

int BTime::isLeapYear ( )

Returns if a leap year.

◆ isSet()

int BTime::isSet ( ) const
inline

Check if set.

◆ operator!=()

int BTime::operator!= ( const BTime time) const
inline

◆ operator+()

BTime BTime::operator+ ( int  seconds) const
inline

◆ operator+=()

BTime & BTime::operator+= ( int  seconds)
inline

◆ operator<()

int BTime::operator< ( const BTime time) const
inline

◆ operator<=()

int BTime::operator<= ( const BTime time) const
inline

◆ operator==()

int BTime::operator== ( const BTime time) const
inline

◆ operator>()

int BTime::operator> ( const BTime time) const
inline

◆ operator>=()

int BTime::operator>= ( const BTime time) const
inline

◆ set() [1/2]

void BTime::set ( BUInt  year,
BUInt  month,
BUInt  day,
BUInt  hour = 0,
BUInt  minute = 0,
BUInt  second = 0 
)

Set the date and time.

◆ set() [2/2]

void BTime::set ( BUInt32  seconds)

Set the date and time.

◆ setString()

BError BTime::setString ( const BString  dateTime)

Sets the date/time from string format.

◆ setYearDay()

void BTime::setYearDay ( BUInt  year,
BUInt  yearDay,
BUInt  hour = 0,
BUInt  minute = 0,
BUInt  second = 0 
)

Set the date and time.

Member Data Documentation

◆ otime

BUInt32 BTime::otime
private

Time in seconds since 1970. range 1970-01-02 to 2106-02-07.


The documentation for this class was generated from the following files:
  • /src/cern/tms/tms/beam/libBeam/BTime.h
  • /src/cern/tms/tms/beam/libBeam/BTime.cpp