Debian Codegraph @

chrono/format.h

raw symbols SCIP
1 #ifndef CHRONO_FORMAT_H
2 #define CHRONO_FORMAT_H
3
4 #include "./datetime.h"
5 #include "./period.h"
6
7 #include <ostream>
8
9 inline std::ostream &operator<<(std::ostream &out, const CppUtilities::DateTime &value)
10 {
11 return out << value.toString(CppUtilities::DateTimeOutputFormat::DateAndTime, false);
12 }
13
14 inline std::ostream &operator<<(std::ostream &out, const CppUtilities::DateTimeExpression &value)
15 {
16 return out << value.toIsoString();
17 }
18
19 inline std::ostream &operator<<(std::ostream &out, const CppUtilities::TimeSpan &value)
20 {
21 return out << value.toString(CppUtilities::TimeSpanOutputFormat::Normal, false);
22 }
23
24 inline std::ostream &operator<<(std::ostream &out, const CppUtilities::Period &value)
25 {
26 return out << value.years() << " years, " << value.months() << " months, " << value.days() << " days";
27 }
28
29 #endif // CHRONO_FORMAT_H