Data structure to store date time to nano-sec precision. More...
#include <DateTime.h>
Public Member Functions | |
DateTime () | |
Default constructor. More... | |
DateTime (double ord) | |
Constructor using ordinal. | |
DateTime (int yy, int mm, int dd) | |
Constructor using year, month, day of month. | |
DateTime (int yy, int mm, int dd, int hh, int mn, int ss) | |
Constructor using date, hours, mins and integer seconds. | |
DateTime (int yy, int mm, int dd, int hh, int mn, double ss) | |
Constructor using date, hours, mins, and floating point seconds. | |
DateTime (int yy, int mm, int dd, int hh, int mn, int ss, double ff) | |
Constructor using date, hours, mins, integer secs and fractional secs. | |
DateTime (const DateTime &ts) | |
Copy constructor. | |
DateTime (const std::string &) | |
Construct from a string representation in ISO-8601 format. | |
operator std::string () const | |
bool | operator< (const DateTime &ts) const |
bool | operator> (const DateTime &ts) const |
bool | operator<= (const DateTime &ts) const |
bool | operator>= (const DateTime &ts) const |
bool | operator== (const DateTime &ts) const |
bool | operator!= (const DateTime &ts) const |
DateTime & | operator= (const DateTime &ts) |
DateTime & | operator= (const std::string &) |
DateTime & | operator+= (const TimeDelta &ts) |
DateTime & | operator+= (const double &s) |
DateTime & | operator-= (const TimeDelta &ts) |
DateTime & | operator-= (const double &s) |
DateTime | operator+ (const TimeDelta &ts) const |
DateTime | operator+ (const double &s) const |
DateTime | operator- (const TimeDelta &ts) const |
DateTime | operator- (const double &s) const |
TimeDelta | operator- (const DateTime &ts) const |
bool | isClose (const DateTime &ts) const |
Check whether two DateTimes are equivalent to within TOL_SECONDS. More... | |
bool | isClose (const DateTime &ts, const TimeDelta &errtol) const |
Check whether two DateTimes are equivalent to within the specified error tolerance. | |
int | dayOfYear () const |
Return day of year. | |
double | secondsOfDay () const |
Return seconds of day. | |
int | dayOfWeek () const |
Return day of week. | |
double | ordinal () const |
Return ordinal - time since GPS time origin. | |
double | secondsSinceEpoch () const |
Return ordinal - time since GPS time origin. | |
double | secondsSinceEpoch (const DateTime &) const |
Return time elapsed since given DateTime epoch. | |
void | secondsSinceEpoch (double) |
Return time elapsed since given ordinal epoch. | |
std::string | isoformat () const |
Return date formatted as ISO-8601 string. | |
void | strptime (const std::string &, const std::string &sep="T") |
Parse a given string in ISO-8601 format. | |
Public Attributes | |
int | year |
int | months |
int | days |
int | hours |
int | minutes |
int | seconds |
double | frac |
Data structure to store date time to nano-sec precision.
|
inline |
Default constructor.
Initialize to origin of GPS time 1970-01-01T00:00:00.0
bool isce3::core::DateTime::isClose | ( | const DateTime & | ts | ) | const |
Check whether two DateTimes are equivalent to within TOL_SECONDS.