15 Date::Date(
const int day,
const int month,
const int year) : day_(day),
19 if (day < 1 || day > 31)
21 if (month < 1 || month > 12)
26 month_(date.getMonth()),
27 year_(date.getYear()) {}
45 if (day >= 1 && day <= 31)
49 if (month >= 1 && month <= 12)
63 if (month >= 1 && month <= 12)
71 if (day >= 1 && day <= 31)
79 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)