diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2017-03-06 17:49:17 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2017-06-24 15:22:51 +0200 |
commit | 7a1f1d7ba2376877b50919c682ee6cca305a2fb3 (patch) | |
tree | 24c146621b9cec0044d9c0ea5b88679550217880 | |
parent | c6863993dbd92014efd2d65576172cde332ebac5 (diff) |
tdf#40575 remove obsolete MAX_DAYS check
Change-Id: Ifccf3a1fe27011a8e72464bf76cadcf16f5f5fa7
-rw-r--r-- | connectivity/source/commontools/dbconversion.cxx | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx index 63dc30858339..763eb6c8ba46 100644 --- a/connectivity/source/commontools/dbconversion.cxx +++ b/connectivity/source/commontools/dbconversion.cxx @@ -30,8 +30,6 @@ #include <sstream> #include <iomanip> -#define MAX_DAYS 3636532 - namespace { const sal_Int64 nanoSecInSec = 1000000000; @@ -270,13 +268,8 @@ namespace dbtools sal_Int32 nTempDays = implRelativeToAbsoluteNull( _rDate ); nTempDays += nDays; - if ( nTempDays > MAX_DAYS ) - { - _rDate.Day = 31; - _rDate.Month = 12; - _rDate.Year = 9999; - } - else if ( nTempDays <= 0 ) + // TODO: can we remove that check? Would allow dates before 1900. + if ( nTempDays <= 0 ) { _rDate.Day = 1; _rDate.Month = 1; @@ -291,13 +284,8 @@ namespace dbtools sal_Int32 nTempDays = implRelativeToAbsoluteNull( _rDate ); nTempDays -= nDays; - if ( nTempDays > MAX_DAYS ) - { - _rDate.Day = 31; - _rDate.Month = 12; - _rDate.Year = 9999; - } - else if ( nTempDays <= 0 ) + // TODO: can we remove that check? Would allow dates before 1900. + if ( nTempDays <= 0 ) { _rDate.Day = 1; _rDate.Month = 1; |