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