/* * Date.cc */ #include "Date.h" #include #include #include #include #include "Date.h" namespace IDA_Date { using namespace std; int Date::get_year() const { return year_; } void Date::set_year(int year) { year_ = year; } int Date::get_month() const { return month_; } void Date::set_month(int month) { month_ = month; } int Date::get_day() const { return day_; } void Date::set_day(int day) { day_ = day; } string Date::str() const { ostringstream os; char filler = os.fill('0'); os << year_ << '-' << setw(2) << month_ << '-' << setw(2) << day_; os.fill(filler); return os.str(); } ostream& operator<<(ostream& os, const Date& d) { return os << d.str(); } } // namespace IDA_Date