Class TimePoint¶
Defined in File Time.hpp
Class Documentation¶
-
class TimePoint¶
Wraps the C++ standard system_clock point in time to provide arithmetic, interactions with Durations and parsing/formatting functions.
The represented time zone is UTC only.
Public Types
-
typedef SystemClock Clock¶
Public Functions
-
inline TimePoint()¶
-
inline TimePoint &operator+=(const Duration &d)¶
Add-assign a Duration to this TimePoint (now + 7 days = next week).
-
inline TimePoint &operator-=(const Duration &d)¶
Subtract-assign a Duration from this TimePoint (now - 7 days = last week).
-
inline std::istream &parse(std::istream &is)¶
Set this TimePoint by parsing the characters in an istream as an ISO 8601 date.
-
inline TimePoint &parse(const std::string &str)¶
Set this TimePoint by parsing a string as an ISO 8601 date.
-
inline std::ostream &format(std::ostream &os, std::string formatStr = ymdhmsFormat) const¶
Print this TimePoint as a formatted date to an ostream.
-
inline std::string format(std::string formatStr = ymdhmsFormat) const¶
Return the formatted string representation of this TimePoint.
Public Members
- friend Duration
-
typedef SystemClock Clock¶