Electronics and Software
Engineering Innovation
Beam-lib  2.15.1

#include <BTime.h>

Public Member Functions

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

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 ( BUInt32  seconds)

Set the date and time.

◆ set() [2/2]

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

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: