diff --git a/src/ISO8601.cpp b/src/ISO8601.cpp index ff1cee3a2..df284d816 100644 --- a/src/ISO8601.cpp +++ b/src/ISO8601.cpp @@ -1109,6 +1109,13 @@ bool ISO8601d::sameWeek (const ISO8601d& rhs) const this->week () == rhs.week (); } +//////////////////////////////////////////////////////////////////////////////// +bool ISO8601d::sameMonth (const ISO8601d& rhs) const +{ + return this->year () == rhs.year () && + this->month () == rhs.month (); +} + //////////////////////////////////////////////////////////////////////////////// void ISO8601p::clear () { diff --git a/src/ISO8601.h b/src/ISO8601.h index 14090f4f5..0f1ec163c 100644 --- a/src/ISO8601.h +++ b/src/ISO8601.h @@ -74,6 +74,7 @@ public: bool sameHour (const ISO8601d&) const; bool sameDay (const ISO8601d&) const; bool sameWeek (const ISO8601d&) const; + bool sameMonth (const ISO8601d&) const; private: void clear ();