From 79f030b199a79bf2c65c16e2d35d34ac34aa4d70 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 26 Sep 2015 15:11:58 -0400 Subject: [PATCH] ISO8601d: Added ::sameYear --- src/ISO8601.cpp | 6 ++++++ src/ISO8601.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/ISO8601.cpp b/src/ISO8601.cpp index df284d816..65712d75a 100644 --- a/src/ISO8601.cpp +++ b/src/ISO8601.cpp @@ -1116,6 +1116,12 @@ bool ISO8601d::sameMonth (const ISO8601d& rhs) const this->month () == rhs.month (); } +//////////////////////////////////////////////////////////////////////////////// +bool ISO8601d::sameYear (const ISO8601d& rhs) const +{ + return this->year () == rhs.year (); +} + //////////////////////////////////////////////////////////////////////////////// void ISO8601p::clear () { diff --git a/src/ISO8601.h b/src/ISO8601.h index 0f1ec163c..3378fb647 100644 --- a/src/ISO8601.h +++ b/src/ISO8601.h @@ -75,6 +75,7 @@ public: bool sameDay (const ISO8601d&) const; bool sameWeek (const ISO8601d&) const; bool sameMonth (const ISO8601d&) const; + bool sameYear (const ISO8601d&) const; private: void clear ();