diff --git a/chrono/format.h b/chrono/format.h index ae922c2..b0b09af 100644 --- a/chrono/format.h +++ b/chrono/format.h @@ -2,6 +2,7 @@ #define CHRONO_FORMAT_H #include "./datetime.h" +#include "./period.h" #include @@ -15,4 +16,9 @@ inline std::ostream &operator<<(std::ostream &out, const ChronoUtilities::TimeSp return out << value.toString(ChronoUtilities::TimeSpanOutputFormat::Normal, false); } +inline std::ostream &operator<<(std::ostream &out, const ChronoUtilities::Period &value) +{ + return out << value.years() << " years, " << value.months() << " months, " << value.days() << " days"; +} + #endif // CHRONO_FORMAT_H