summaryrefslogtreecommitdiff
path: root/include/tools/date.hxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-07-20 18:32:57 +0200
committerEike Rathke <erack@redhat.com>2017-07-21 12:24:27 +0200
commitfcd0361d6be8d088be12e500f0120afd7995d1ac (patch)
tree9e18c0310405d68d9151db9073cc8f6926df077d /include/tools/date.hxx
parent2e486daff35ab16e810bfdafb24b19bcbf2fe8cd (diff)
Eliminate Date::operator+=() and -=() and replace with Date::AddDays()
Clarifies code and gets rid of explicitly casting the operand to sal_Int32. Also in preparation of removing DateTime::operator+=(sal_Int32) that is confusingly similar to DateTime::operator+=(double) and just depends on type. Change-Id: I83422e2940fbb017978db9b5734b4966228af3de Reviewed-on: https://gerrit.libreoffice.org/40248 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'include/tools/date.hxx')
-rw-r--r--include/tools/date.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/tools/date.hxx b/include/tools/date.hxx
index 3e038beb308b..071b3c3b765c 100644
--- a/include/tools/date.hxx
+++ b/include/tools/date.hxx
@@ -125,6 +125,10 @@ public:
*/
void AddMonths( sal_Int32 nAddMonths );
+ /** Add days skipping year 0 and truncating at limits.
+ */
+ void AddDays( sal_Int32 nAddDays );
+
/** Obtain the day of the week for the date.
Internally normalizes a copy of values.
@@ -216,8 +220,6 @@ public:
{ mnDate = rDate.mnDate; return *this; }
Date& operator =( const css::util::Date& rUDate )
{ setDateFromDMY( rUDate.Day, rUDate.Month, rUDate.Year); return *this; }
- Date& operator +=( sal_Int32 nDays );
- Date& operator -=( sal_Int32 nDays );
Date& operator ++();
Date& operator --();