summaryrefslogtreecommitdiff
path: root/basic/source/inc/date.hxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-05-02 23:08:03 +0200
committerEike Rathke <erack@redhat.com>2017-05-02 23:12:34 +0200
commit6d424f07701bf26d8fb173563b567d5f097c33e2 (patch)
tree06c5a0bf2eb4b70668d56bb6e972587b19243627 /basic/source/inc/date.hxx
parenteace834d0830bbf4c89f7f5ea8666fb91527e466 (diff)
Replace mouth-painted "inaccurate around leap year" rollover algorithm
... with proper tools::Date methods Normalize() and AddMonths(). Also prepare functionality to easily switch on rollover for StarBASIC as well, i.e. when called by DateSerial() runtime function. For StarBASIC, invalid date for day > daysinmonthofyear is now (or better since a previous commit 94bb96ada421b423e9ed30526fe5a6aac95f00b9 from today) properly detected, not just dumb 1<=day<=31. Change-Id: Ibb44f7247726f1e1168f0e66c5ae18e073d19f08
Diffstat (limited to 'basic/source/inc/date.hxx')
-rw-r--r--basic/source/inc/date.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/inc/date.hxx b/basic/source/inc/date.hxx
index eb44aa1ec76c..6173a0b44dd0 100644
--- a/basic/source/inc/date.hxx
+++ b/basic/source/inc/date.hxx
@@ -24,11 +24,11 @@
#include <com/sun/star/util/Time.hpp>
#include <com/sun/star/util/DateTime.hpp>
-bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, bool bUseTwoDigitYear, double& rdRet );
+bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, bool bUseTwoDigitYear, bool bRollOver, double& rdRet );
double implTimeSerial( sal_Int16 nHour, sal_Int16 nMinute, sal_Int16 nSecond);
bool implDateTimeSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay,
sal_Int16 nHour, sal_Int16 nMinute, sal_Int16 nSecond,
- bool bUseTwoDigitYear, double& rdRet );
+ bool bUseTwoDigitYear, bool bRollOver, double& rdRet );
sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 );