isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Public Attributes | List of all members
isce3::core::DateTime Class Reference

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
 
DateTimeoperator= (const DateTime &ts)
 
DateTimeoperator= (const std::string &)
 
DateTimeoperator+= (const TimeDelta &ts)
 
DateTimeoperator+= (const double &s)
 
DateTimeoperator-= (const TimeDelta &ts)
 
DateTimeoperator-= (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
 

Detailed Description

Data structure to store date time to nano-sec precision.

Constructor & Destructor Documentation

isce3::core::DateTime::DateTime ( )
inline

Default constructor.

Initialize to origin of GPS time 1970-01-01T00:00:00.0

Member Function Documentation

bool isce3::core::DateTime::isClose ( const DateTime ts) const

Check whether two DateTimes are equivalent to within TOL_SECONDS.


The documentation for this class was generated from the following files:

Generated for ISCE3.0 by doxygen 1.8.5.