GCS  0.2.3
Public Member Functions | Static Public Member Functions | Friends
gu::datetime::Period Class Reference

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 &)
 

Detailed Description

Class representing time periods instead of system clock time.

Constructor & Destructor Documentation

gu::datetime::Period::Period ( const std::string &  str = "")
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.

Parameters
strTime period represented in ISO8601 duration format.

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