diff --git a/toml/datetime.hpp b/toml/datetime.hpp index 01b513c..0d56e76 100644 --- a/toml/datetime.hpp +++ b/toml/datetime.hpp @@ -172,9 +172,9 @@ template std::basic_ostream& operator<<(std::basic_ostream& os, const local_date& date) { - os << std::setfill('0') << std::setw(4) << static_cast(date.year ) << '-'; - os << std::setfill('0') << std::setw(2) << static_cast(date.month + 1) << '-'; - os << std::setfill('0') << std::setw(2) << static_cast(date.day ); + os << std::setfill('0') << std::setw(4) << static_cast(date.year ) << '-'; + os << std::setfill('0') << std::setw(2) << static_cast(date.month) + 1 << '-'; + os << std::setfill('0') << std::setw(2) << static_cast(date.day ) ; return os; }