ISO8601d: Added ::operator-- (postfix)

This commit is contained in:
Paul Beckingham
2015-09-26 16:05:47 -04:00
parent ef6d0a8f9a
commit e96eaaac38
2 changed files with 15 additions and 0 deletions

View File

@@ -1215,6 +1215,20 @@ void ISO8601d::operator-- ()
_date = yesterday._date;
}
////////////////////////////////////////////////////////////////////////////////
// Postfix decrement by one day.
void ISO8601d::operator-- (int)
{
ISO8601d yesterday = startOfDay () - 1;
yesterday = ISO8601d (yesterday.month (),
yesterday.day (),
yesterday.year (),
hour (),
minute (),
second ());
_date = yesterday._date;
}
////////////////////////////////////////////////////////////////////////////////
void ISO8601p::clear ()
{