50 Date::Date(
const int day,
const int month,
const int year) : day_(day),
54 if (day < 1 || day > 31)
56 if (month < 1 || month > 12)
61 month_(date.getMonth()),
62 year_(date.getYear()) {}
80 if (day >= 1 && day <= 31)
84 if (month >= 1 && month <= 12)
98 if (month >= 1 && month <= 12)
106 if (day >= 1 && day <= 31)
114 string date, uDay =
"", uMonth =
"";
std::string getDateStr() const
Get the Date as a string.
int getMonth() const
Get the month as an int.
void setYear(const int year)
Set the year.
int getYear() const
Get the Year as an int.
bool operator==(const Date &date) const
The == operator.
void setDay(const int day)
Set the day.
Date(const int day=1, const int month=1, const int year=2000)
Build a new Date from three values.
void setMonth(const int month)
Set the month.
bool operator<(const Date &date) const
The < operator.
Date & operator=(const Date &date)
The Date copy operator.
~Date()
Destroy the Date object.
void setDate(const int day, const int month, const int year)
Set the Date.
int getDay() const
Get the day as an int.
std::string toString(T t)