#include <DateTime.hpp>
Public Member Functions | |
| const Date & | date () const |
| getter to date member More... | |
| DateTime () | |
| default constructor More... | |
| DateTime (const Date &date) | |
| constructor from Date More... | |
| DateTime (const Date &date, const Time &timeFromDate) | |
| constructor from Date and Time More... | |
| DateTime (const DateTime &other) | |
| copy constructor More... | |
| DateTime (const std::string &string) | |
| constructor from string More... | |
| DateTime (tm t_tm) | |
| from system tm struct More... | |
| bool | operator!= (const DateTime &other) const |
| non-equality operator More... | |
| DateTime | operator+ (const Time &time) const |
| addition operator More... | |
| DateTime & | operator+= (const Time &time) |
| assignment by addition operator More... | |
| DateTime | operator- (const Time &time) const |
| difference operator More... | |
| Time | operator- (const DateTime &dateTime) const |
| time duration More... | |
| Time | operator- (const Date &date) const |
| time duration More... | |
| DateTime & | operator-= (const Time &time) |
| assignment by difference operator More... | |
| bool | operator< (const DateTime &rhs) const |
| less than operator More... | |
| bool | operator<= (const DateTime &rhs) const |
| less than equals operator More... | |
| DateTime & | operator= (const DateTime &other) |
| assignment operator More... | |
| bool | operator== (const DateTime &other) const |
| equality operator More... | |
| bool | operator> (const DateTime &rhs) const |
| greater than operator More... | |
| bool | operator>= (const DateTime &rhs) const |
| greater than equals operator More... | |
| const Time & | time () const |
| getter to time member More... | |
| time_t | toEpoch () const |
| convert to epoch time_t More... | |
| std::string | toISO8601 () const |
| convert to ISO 8601 string More... | |
| std::string | toString () const |
| convert to string More... | |
Static Public Member Functions | |
| static DateTime | fromEpoch (const std::time_t &time) |
| construct from epoch time_t More... | |
| static boost::optional< DateTime > | fromISO8601 (const std::string &str) |
| construct from ISO 8601 string More... | |
| static openstudio::LogChannel | logChannel () |
| static DateTime | now () |
| get the local time now More... | |
DateTime is an absolute unit of time, resolution to the second date is a valid Date time is normalized to 0 <= time < 24 hrs.
| openstudio::DateTime::DateTime | ( | ) |
default constructor
| openstudio::DateTime::DateTime | ( | const DateTime & | other | ) |
copy constructor
| openstudio::DateTime::DateTime | ( | const std::string & | string | ) |
constructor from string
| openstudio::DateTime::DateTime | ( | tm | t_tm | ) |
from system tm struct
| const Date& openstudio::DateTime::date | ( | ) | const |
getter to date member
|
static |
construct from epoch time_t
|
static |
construct from ISO 8601 string
|
inlinestatic |
|
static |
get the local time now
| bool openstudio::DateTime::operator!= | ( | const DateTime & | other | ) | const |
non-equality operator
| bool openstudio::DateTime::operator< | ( | const DateTime & | rhs | ) | const |
less than operator
| bool openstudio::DateTime::operator<= | ( | const DateTime & | rhs | ) | const |
less than equals operator
| bool openstudio::DateTime::operator== | ( | const DateTime & | other | ) | const |
equality operator
| bool openstudio::DateTime::operator> | ( | const DateTime & | rhs | ) | const |
greater than operator
| bool openstudio::DateTime::operator>= | ( | const DateTime & | rhs | ) | const |
greater than equals operator
| const Time& openstudio::DateTime::time | ( | ) | const |
getter to time member
| time_t openstudio::DateTime::toEpoch | ( | ) | const |
convert to epoch time_t
| std::string openstudio::DateTime::toISO8601 | ( | ) | const |
convert to ISO 8601 string
| std::string openstudio::DateTime::toString | ( | ) | const |
convert to string