Go to the documentation of this file.    1 #ifndef __JSYSTEM__JDATE__ 
    2 #define __JSYSTEM__JDATE__ 
   26     static const int        MAX_SIZE = 256;
 
   27     static char      buffer[MAX_SIZE];
 
   31     strftime(buffer, MAX_SIZE, 
"%x", localtime(&ts));
 
   45     static const int        MAX_SIZE = 256;
 
   46     static char      buffer[MAX_SIZE];
 
   50     strftime(buffer, MAX_SIZE, 
"%X", localtime(&ts));
 
  104     operator std::string()
 const 
  117       const std::string buffer = ctime(&
ts);
 
  121       return buffer.substr(0, buffer.length() - 1);
 
  154     void set(
const time_t t1)
 const 
  169       return difftime(this->
ts, 
object.
ts);
 
  182       return out << 
object.toString();
 
 
int getSeconds() const
seconds after the minute [0-59]
 
const char * getTime()
Get ASCII formatted time.
 
std::string toString() const
Get ASCII formatted date and time.
 
int getDay() const
day of the month [1-31]
 
static JDateAndTime getDateAndTime
Function object to get ASCII formatted date and time.
 
JDateAndTime(const time_t t1)
Constructor.
 
friend std::ostream & operator<<(std::ostream &out, const JDateAndTime &object)
Write date and time to output.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
JDateAndTime()
Default constructor.
 
Auxiliary classes and methods for operating system calls.
 
int getYear() const
year a.d.
 
int getMonth() const
month of the year [1-12]
 
double getElapsedTime(const JDateAndTime &object) const
Get elapsed time since given date and time.
 
Auxililary class to get date and time.
 
const tm * operator->() const
Smart pointer.
 
const JDateAndTime & operator()() const
Set date and time.
 
void set(const time_t t1) const
Set to given time.
 
const char * getDate()
Get ASCII formatted date.
 
int getHour() const
hours after midnight [0-23]
 
int getMinutes() const
minutes after the hour [0-59]
 
void set() const
Set to actual time.