diff options
Diffstat (limited to 'sc/source/core/data/table4.cxx')
-rw-r--r-- | sc/source/core/data/table4.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx index 4aec7dfea954..57c9edac8d34 100644 --- a/sc/source/core/data/table4.cxx +++ b/sc/source/core/data/table4.cxx @@ -1253,8 +1253,7 @@ void ScTable::IncDate(double& rVal, sal_uInt16& nDayOfMonth, double nStep, FillD { aDate.SetMonth((sal_uInt16) nMonth); aDate.SetYear((sal_uInt16) nYear); - if ( nDayOfMonth > 28 ) - aDate.SetDay( Min( aDate.GetDaysInMonth(), nDayOfMonth ) ); + aDate.SetDay( std::min( Date::GetDaysInMonth( nMonth, nYear), nDayOfMonth ) ); } } break; |