C++ Utilities
5.7.0
Useful C++ classes and routines such as argument parser, IO and conversion utilities
|
Go to the documentation of this file. 1 #ifndef CHRONO_FORMAT_H
2 #define CHRONO_FORMAT_H
11 return out << value.
toString(CppUtilities::DateTimeOutputFormat::DateAndTime,
false);
16 return out << value.
toString(CppUtilities::TimeSpanOutputFormat::Normal,
false);
21 return out << value.
years() <<
" years, " << value.
months() <<
" months, " << value.
days() <<
" days";
24 #endif // CHRONO_FORMAT_H
std::string toString(DateTimeOutputFormat format=DateTimeOutputFormat::DateAndTime, bool noMilliseconds=false) const
Returns the string representation of the current instance using the specified format.
Represents a period of time.
constexpr int days() const
Returns the days component of the period represented by the current instance.
std::string toString(TimeSpanOutputFormat format=TimeSpanOutputFormat::Normal, bool fullSeconds=false) const
Converts the value of the current TimeSpan object to its equivalent std::string representation accord...
constexpr int months() const
Returns the months component of the period represented by the current instance.
constexpr int years() const
Returns the years component of the period represented by the current instance.
Represents a time interval.
Represents an instant in time, typically expressed as a date and time of day.