|
Jpp
17.3.0-rc.1
the software that should make you happy
|
Auxiliary class for date and time. More...
#include <JDate.hh>
Public Member Functions | |
| JDateAndTime () | |
| Default constructor. More... | |
| JDateAndTime (const time_t t1, const bool utc=false) | |
| Constructor. More... | |
| JDateAndTime (const std::string &buffer) | |
| Constructor. More... | |
| const tm * | operator-> () const |
| Smart pointer. More... | |
| tm * | operator-> () |
| Smart pointer. More... | |
| bool | isUTC () const |
| Check if UTC time. More... | |
| time_t | getTime () const |
| time More... | |
| int | getSeconds () const |
| seconds after the minute [0-59] More... | |
| int | getMinutes () const |
| minutes after the hour [0-59] More... | |
| int | getHour () const |
| hours after midnight [0-23] More... | |
| int | getDay () const |
| day of the month [1-31] More... | |
| int | getMonth () const |
| month of the year [1-12] More... | |
| int | getYear () const |
| year a.d. More... | |
| int | getDST () const |
| daylight saving time More... | |
| operator std::string () const | |
| Type conversion operator. More... | |
| std::string | toString () const |
| Get ASCII formatted date and time. More... | |
| const JDateAndTime & | operator() () |
| Set date and time. More... | |
| void | set (const bool utc=false) |
| Set to current local time. More... | |
| void | set (const time_t t1, const bool utc=false) |
| Set to given time. More... | |
| void | add (const time_t t1) |
| Add given time. More... | |
| void | sub (const time_t t1) |
| Subtract given time. More... | |
| double | getElapsedTime (const JDateAndTime &object) const |
| Get elapsed time to given date and time. More... | |
Static Public Member Functions | |
| static bool | isISO8601 (const std::string &buffer) |
| Function to check ISO-8601 conformity. More... | |
Private Attributes | |
| time_t | ts |
| value More... | |
| tm * | tp |
| representation More... | |
| bool | utc = false |
| UTC. More... | |
Friends | |
| std::istream & | operator>> (std::istream &in, JDateAndTime &object) |
| Read date and time from input stream. More... | |
| std::ostream & | operator<< (std::ostream &out, const JDateAndTime &object) |
| Write date and time to output stream. More... | |
Auxiliary class for date and time.
The data structure time_t is used for the internal value and the data structure tm for the representation.
The I/O format conforms with ISO-8601 standard but it is also possible to parse ROOT TTimeStamp::AsString("c").
Definition at line 75 of file JSystem/JDate.hh.
|
inline |
Default constructor.
Definition at line 79 of file JSystem/JDate.hh.
|
inline |
Constructor.
| t1 | time |
| utc | UTC |
Definition at line 91 of file JSystem/JDate.hh.
|
inline |
Constructor.
| buffer | date and time |
Definition at line 102 of file JSystem/JDate.hh.
|
inline |
|
inline |
|
inline |
Check if UTC time.
Definition at line 212 of file JSystem/JDate.hh.
|
inline |
time
Definition at line 218 of file JSystem/JDate.hh.
|
inline |
seconds after the minute [0-59]
Definition at line 220 of file JSystem/JDate.hh.
|
inline |
minutes after the hour [0-59]
Definition at line 221 of file JSystem/JDate.hh.
|
inline |
hours after midnight [0-23]
Definition at line 222 of file JSystem/JDate.hh.
|
inline |
day of the month [1-31]
Definition at line 223 of file JSystem/JDate.hh.
|
inline |
month of the year [1-12]
Definition at line 224 of file JSystem/JDate.hh.
|
inline |
year a.d.
Definition at line 225 of file JSystem/JDate.hh.
|
inline |
daylight saving time
Definition at line 226 of file JSystem/JDate.hh.
|
inline |
Type conversion operator.
Definition at line 234 of file JSystem/JDate.hh.
|
inlinestatic |
Function to check ISO-8601 conformity.
| buffer | date and time |
Definition at line 246 of file JSystem/JDate.hh.
|
inline |
Get ASCII formatted date and time.
Definition at line 267 of file JSystem/JDate.hh.
|
inline |
Set date and time.
Definition at line 285 of file JSystem/JDate.hh.
|
inline |
Set to current local time.
| utc | UTC |
Definition at line 298 of file JSystem/JDate.hh.
|
inline |
|
inline |
Add given time.
| t1 | time |
Definition at line 327 of file JSystem/JDate.hh.
|
inline |
Subtract given time.
| t1 | time |
Definition at line 338 of file JSystem/JDate.hh.
|
inline |
Get elapsed time to given date and time.
| object | date and time |
Definition at line 350 of file JSystem/JDate.hh.
|
friend |
Read date and time from input stream.
| in | input stream |
| object | date and time |
Definition at line 363 of file JSystem/JDate.hh.
|
friend |
Write date and time to output stream.
| out | output stream |
| object | date and time |
Definition at line 382 of file JSystem/JDate.hh.
|
private |
value
Definition at line 389 of file JSystem/JDate.hh.
|
private |
representation
Definition at line 390 of file JSystem/JDate.hh.
|
private |
UTC.
Definition at line 391 of file JSystem/JDate.hh.
1.8.5