Kaydet (Commit) 8ea72533 authored tarafından Eike Rathke's avatar Eike Rathke

Date::IsValidDate: year 0 is not

Change-Id: I44e476f354d04a1d070a7348e3b00d75497231c2
üst de9106a5
...@@ -464,6 +464,8 @@ bool Date::IsValidDate() const ...@@ -464,6 +464,8 @@ bool Date::IsValidDate() const
//static //static
bool Date::IsValidDate( sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear ) bool Date::IsValidDate( sal_uInt16 nDay, sal_uInt16 nMonth, sal_Int16 nYear )
{ {
if (nYear == 0)
return false;
if ( !nMonth || (nMonth > 12) ) if ( !nMonth || (nMonth > 12) )
return false; return false;
if ( !nDay || (nDay > ImplDaysInMonth( nMonth, nYear )) ) if ( !nDay || (nDay > ImplDaysInMonth( nMonth, nYear )) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment