Common C++ classes and routines used by my applications such as argument parser, IO and conversion utilities
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
701 B

#ifndef CHRONO_FORMAT_H
#define CHRONO_FORMAT_H
#include "./datetime.h"
#include "./period.h"
#include <ostream>
inline std::ostream &operator<<(std::ostream &out, const CppUtilities::DateTime &value)
{
return out << value.toString(CppUtilities::DateTimeOutputFormat::DateAndTime, false);
}
inline std::ostream &operator<<(std::ostream &out, const CppUtilities::TimeSpan &value)
{
return out << value.toString(CppUtilities::TimeSpanOutputFormat::Normal, false);
}
inline std::ostream &operator<<(std::ostream &out, const CppUtilities::Period &value)
{
return out << value.years() << " years, " << value.months() << " months, " << value.days() << " days";
}
#endif // CHRONO_FORMAT_H