diff options
author | Eike Rathke <erack@redhat.com> | 2017-05-02 17:23:23 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-05-02 17:23:56 +0200 |
commit | 8ea7253327b70adb2c497bfd3a1734d9abd0c65b (patch) | |
tree | f0f77236c9066189555851beafbb1be055327e77 /tools | |
parent | de9106a511ed9c202423e3c3a9754feb4f969364 (diff) |
Date::IsValidDate: year 0 is not
Change-Id: I44e476f354d04a1d070a7348e3b00d75497231c2
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/datetime/tdate.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx index 46e5ad62469e..9815716ebe3f 100644 --- a/tools/source/datetime/tdate.cxx +++ b/tools/source/datetime/tdate.cxx @@ -464,6 +464,8 @@ bool Date::IsValidDate() const //static bool Date::IsValidDate( sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear ) { + if (nYear == 0) + return false; if ( !nMonth || (nMonth > 12) ) return false; if ( !nDay || (nDay > ImplDaysInMonth( nMonth, nYear )) ) |