mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
ISO8601: Added ::sameQuarter
This commit is contained in:
parent
091122350c
commit
dd72bed28a
2 changed files with 23 additions and 15 deletions
|
@ -1574,6 +1574,13 @@ bool ISO8601d::sameMonth (const ISO8601d& rhs) const
|
||||||
this->month () == rhs.month ();
|
this->month () == rhs.month ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
bool ISO8601d::sameQuarter (const ISO8601d& rhs) const
|
||||||
|
{
|
||||||
|
return (this->year () == rhs.year ()) &&
|
||||||
|
((this->month () - 1) / 4) == ((rhs.month () - 1) / 4);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool ISO8601d::sameYear (const ISO8601d& rhs) const
|
bool ISO8601d::sameYear (const ISO8601d& rhs) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -96,6 +96,7 @@ public:
|
||||||
bool sameDay (const ISO8601d&) const;
|
bool sameDay (const ISO8601d&) const;
|
||||||
bool sameWeek (const ISO8601d&) const;
|
bool sameWeek (const ISO8601d&) const;
|
||||||
bool sameMonth (const ISO8601d&) const;
|
bool sameMonth (const ISO8601d&) const;
|
||||||
|
bool sameQuarter (const ISO8601d&) const;
|
||||||
bool sameYear (const ISO8601d&) const;
|
bool sameYear (const ISO8601d&) const;
|
||||||
ISO8601d operator+ (const int);
|
ISO8601d operator+ (const int);
|
||||||
ISO8601d operator- (const int);
|
ISO8601d operator- (const int);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue