diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2017-03-06 17:49:17 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2017-03-06 17:55:42 +0100 |
commit | 57909620b4493ae7c8fe950c47e2c826b3c164aa (patch) | |
tree | b9246c67a741541c10174d0cb14324f693b126a1 /connectivity/source | |
parent | 979e4b822cf03c8bde6885893c8c93f3a0e467f1 (diff) |
tdf#40575 remove obsolete MAX_DAYS check
Change-Id: Ifccf3a1fe27011a8e72464bf76cadcf16f5f5fa7
Diffstat (limited to 'connectivity/source')
-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; |