mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
ISO8601d: ::operator++ (prefix)
This commit is contained in:
parent
e96eaaac38
commit
98dbfb01b4
2 changed files with 15 additions and 0 deletions
|
@ -1229,6 +1229,20 @@ void ISO8601d::operator-- (int)
|
||||||
_date = yesterday._date;
|
_date = yesterday._date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Prefix increment by one day.
|
||||||
|
void ISO8601d::operator++ ()
|
||||||
|
{
|
||||||
|
ISO8601d tomorrow = (startOfDay () + 90001).startOfDay ();
|
||||||
|
tomorrow = ISO8601d (tomorrow.month (),
|
||||||
|
tomorrow.day (),
|
||||||
|
tomorrow.year (),
|
||||||
|
hour (),
|
||||||
|
minute (),
|
||||||
|
second ());
|
||||||
|
_date = tomorrow._date;
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void ISO8601p::clear ()
|
void ISO8601p::clear ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -87,6 +87,7 @@ public:
|
||||||
time_t operator- (const ISO8601d&);
|
time_t operator- (const ISO8601d&);
|
||||||
void operator-- (); // Prefix
|
void operator-- (); // Prefix
|
||||||
void operator-- (int); // Postfix
|
void operator-- (int); // Postfix
|
||||||
|
void operator++ (); // Prefix
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void clear ();
|
void clear ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue