GCS
0.2.3
|
Class representing time periods instead of system clock time. More...
#include <gu_datetime.hpp>
Public Member Functions | |
Period (const std::string &str="") | |
Constructor. More... | |
Period (const long long nsecs_) | |
bool | operator== (const Period &cmp) const |
bool | operator< (const Period &cmp) const |
bool | operator>= (const Period &cmp) const |
Period | operator+ (const long long add) const |
Period | operator- (const long long dec) const |
Period | operator* (const long long mul) const |
Period | operator/ (const long long div) const |
long long | get_nsecs () const |
Static Public Member Functions | |
static Period | min () |
static Period | max () |
Friends | |
class | Date |
std::istream & | operator>> (std::istream &, Period &) |
Class representing time periods instead of system clock time.
|
inline |
Constructor.
Duration format is PnYnMnDTnHnMnS where Y is year, M is month, D is day, T is the time designator separating date and time parts, H denotes hours, M (after T) is minutes and S seconds.
All other n:s are expected to be integers except the one before S which can be decimal to represent fractions of second.
str | Time period represented in ISO8601 duration format. |