Cern
LibTmsApi 2.3.0

#include <BDate.h>

Public Member Functions

 BDate (int year=0, int month=1, int day=1)
 
 BDate (BString str)
 
 ~BDate ()
 
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)
 Set time using Unix time (seconds from 1970-01-01)
 
void set (int year=0, int month=1, int day=1)
 
void setYDay (int year=0, int yday=0)
 
void setNow ()
 Set the timeStamp to now.
 
int year ()
 
int yday ()
 
int month ()
 
int day ()
 
void getDate (int &year, int &mon, int &day)
 
BString getString ()
 Get the time as an ISO date/time string.
 
BString getStringFormatted (BString format)
 Gets the time in a string form as per the format. Format syntax as per strftime()
 
BError setString (BString str)
 Set the time from an ISO date/time.
 
int isSet ()
 
int compare (const BDate &date) const
 Compare two dates.
 
 operator BString ()
 
int operator== (const BDate &date) const
 
int operator!= (const BDate &date) const
 
int operator> (const BDate &date) const
 
int operator>= (const BDate &date) const
 
int operator< (const BDate &date) const
 
int operator<= (const BDate &date) const
 

Static Public Member Functions

static int isLeap (int year)
 
static int daysInMonth (int year, int month)
 

Public Attributes

uint16_t oyear
 Year (0 .. 65535)
 
uint16_t oyday
 Day in year (0 .. 365)
 

Constructor & Destructor Documentation

◆ BDate() [1/2]

BDate::BDate ( int  year = 0,
int  month = 1,
int  day = 1 
)

◆ BDate() [2/2]

BDate::BDate ( BString  str)

◆ ~BDate()

BDate::~BDate ( )

Member Function Documentation

◆ clear()

void BDate::clear ( )

Clear the date/time.

◆ compare()

int BDate::compare ( const BDate date) const

Compare two dates.

◆ day()

int BDate::day ( )

◆ daysInMonth()

int BDate::daysInMonth ( int  year,
int  month 
)
static

◆ getDate()

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

◆ getString()

BString BDate::getString ( )

Get the time as an ISO date/time string.

◆ getStringFormatted()

BString BDate::getStringFormatted ( BString  format)

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

◆ isLeap()

int BDate::isLeap ( int  year)
static

◆ isSet()

int BDate::isSet ( )
inline

◆ month()

int BDate::month ( )

◆ operator BString()

BDate::operator BString ( )
inline

◆ operator!=()

int BDate::operator!= ( const BDate date) const
inline

◆ operator<()

int BDate::operator< ( const BDate date) const
inline

◆ operator<=()

int BDate::operator<= ( const BDate date) const
inline

◆ operator==()

int BDate::operator== ( const BDate date) const
inline

◆ operator>()

int BDate::operator> ( const BDate date) const
inline

◆ operator>=()

int BDate::operator>= ( const BDate date) const
inline

◆ set() [1/2]

void BDate::set ( int  year = 0,
int  month = 1,
int  day = 1 
)

◆ set() [2/2]

void BDate::set ( time_t  time)

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

◆ setFirst()

void BDate::setFirst ( )

Set the first date available.

◆ setLast()

void BDate::setLast ( )

Set the last date available.

◆ setNow()

void BDate::setNow ( )

Set the timeStamp to now.

◆ setString()

BError BDate::setString ( BString  str)

Set the time from an ISO date/time.

◆ setYDay()

void BDate::setYDay ( int  year = 0,
int  yday = 0 
)

◆ yday()

int BDate::yday ( )

◆ year()

int BDate::year ( )

Member Data Documentation

◆ oyday

uint16_t BDate::oyday

Day in year (0 .. 365)

◆ oyear

uint16_t BDate::oyear

Year (0 .. 65535)


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