|
Jpp
18.2.1-ARCA-DF-PATCH
the software that should make you happy
|
Auxiliary class for date and time. More...
#include <JDateAndTime.hh>
Public Member Functions | |
| JDateAndTime (const bool utc=false) | |
| Constructor. More... | |
| JDateAndTime (const time_t t1, const bool utc=false) | |
| Constructor. More... | |
| JDateAndTime (const time_t t1, const float f1, const bool utc=false) | |
| Constructor. More... | |
| JDateAndTime (const std::string &buffer) | |
| Constructor. More... | |
| bool | less (const JDateAndTime &object) const |
| Less than method. More... | |
| const tm * | operator-> () const |
| 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... | |
| float | getFS () const |
| fraction of second 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 | set (const time_t t1, const float f1, 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 Member Functions | |
| tm * | get () const |
| Get representation. More... | |
Private Attributes | |
| time_t | ts |
| value More... | |
| float | fs = 0.0 |
| fraction of second 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 78 of file JDateAndTime.hh.
|
inline |
Constructor.
| utc | UTC |
Definition at line 86 of file JDateAndTime.hh.
|
inline |
Constructor.
| t1 | time [s] |
| utc | UTC |
Definition at line 98 of file JDateAndTime.hh.
|
inline |
Constructor.
| t1 | time [s] |
| f1 | fraction of seconds |
| utc | UTC |
Definition at line 111 of file JDateAndTime.hh.
|
inline |
|
inline |
Less than method.
| object | date and time |
Definition at line 136 of file JDateAndTime.hh.
|
inline |
|
inline |
Check if UTC time.
Definition at line 158 of file JDateAndTime.hh.
|
inline |
time
Definition at line 164 of file JDateAndTime.hh.
|
inline |
seconds after the minute [0-59]
Definition at line 166 of file JDateAndTime.hh.
|
inline |
minutes after the hour [0-59]
Definition at line 167 of file JDateAndTime.hh.
|
inline |
hours after midnight [0-23]
Definition at line 168 of file JDateAndTime.hh.
|
inline |
day of the month [1-31]
Definition at line 169 of file JDateAndTime.hh.
|
inline |
month of the year [1-12]
Definition at line 170 of file JDateAndTime.hh.
|
inline |
year a.d.
Definition at line 171 of file JDateAndTime.hh.
|
inline |
daylight saving time
Definition at line 172 of file JDateAndTime.hh.
|
inline |
fraction of second
Definition at line 174 of file JDateAndTime.hh.
|
inline |
Type conversion operator.
Definition at line 182 of file JDateAndTime.hh.
|
inlinestatic |
Function to check ISO-8601 conformity.
| buffer | date and time |
Definition at line 194 of file JDateAndTime.hh.
|
inline |
Get ASCII formatted date and time.
Definition at line 215 of file JDateAndTime.hh.
|
inline |
Set date and time.
Definition at line 233 of file JDateAndTime.hh.
|
inline |
Set to current local time.
| utc | UTC |
Definition at line 246 of file JDateAndTime.hh.
|
inline |
|
inline |
Set to given time.
| t1 | time [s] |
| f1 | fraction of seconds |
| utc | UTC |
Definition at line 276 of file JDateAndTime.hh.
|
inline |
Add given time.
| t1 | time [s] |
Definition at line 289 of file JDateAndTime.hh.
|
inline |
Subtract given time.
| t1 | time [s] |
Definition at line 300 of file JDateAndTime.hh.
|
inline |
Get elapsed time to given date and time.
| object | date and time |
Definition at line 312 of file JDateAndTime.hh.
|
inlineprivate |
|
friend |
Read date and time from input stream.
| in | input stream |
| object | date and time |
Definition at line 325 of file JDateAndTime.hh.
|
friend |
Write date and time to output stream.
| out | output stream |
| object | date and time |
Definition at line 442 of file JDateAndTime.hh.
|
private |
value
Definition at line 458 of file JDateAndTime.hh.
|
private |
fraction of second
Definition at line 459 of file JDateAndTime.hh.
|
mutableprivate |
representation
Definition at line 460 of file JDateAndTime.hh.
|
private |
UTC.
Definition at line 461 of file JDateAndTime.hh.
1.8.5