summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoros <os@openoffice.org>2009-10-08 16:15:40 +0200
committeros <os@openoffice.org>2009-10-08 16:15:40 +0200
commitebd43b03d516d0d2ee06d9f00cfc884aa81e5631 (patch)
tree0139a37f9c20ee14627319dfd50d66be0fedd76b
parentCreate DEV300_m58 milestone tag from trunk@276042 (diff)
downloadcore-ebd43b03d516d0d2ee06d9f00cfc884aa81e5631.tar.gz
core-ebd43b03d516d0d2ee06d9f00cfc884aa81e5631.zip
#i105687# enable number format for custom date/datetime/time data
-rw-r--r--tools/inc/tools/date.hxx3
-rw-r--r--tools/source/datetime/tdate.cxx6
2 files changed, 6 insertions, 3 deletions
diff --git a/tools/inc/tools/date.hxx b/tools/inc/tools/date.hxx
index 87602e27d874..e14be54b7df1 100644
--- a/tools/inc/tools/date.hxx
+++ b/tools/inc/tools/date.hxx
@@ -115,6 +115,9 @@ public:
TOOLS_DLLPUBLIC friend Date operator +( const Date& rDate, long nDays );
TOOLS_DLLPUBLIC friend Date operator -( const Date& rDate, long nDays );
TOOLS_DLLPUBLIC friend long operator -( const Date& rDate1, const Date& rDate2 );
+
+ static long DateToDays( USHORT nDay, USHORT nMonth, USHORT nYear );
+
};
#endif // _DATE_HXX
diff --git a/tools/source/datetime/tdate.cxx b/tools/source/datetime/tdate.cxx
index 7f204d5e46da..5f0d7f3ebe1d 100644
--- a/tools/source/datetime/tdate.cxx
+++ b/tools/source/datetime/tdate.cxx
@@ -88,7 +88,7 @@ inline USHORT DaysInMonth( USHORT nMonth, USHORT nYear )
// -----------------------------------------------------------------------
-static long DateToDays( USHORT nDay, USHORT nMonth, USHORT nYear )
+long Date::DateToDays( USHORT nDay, USHORT nMonth, USHORT nYear )
{
long nDays;
@@ -489,9 +489,9 @@ Date operator -( const Date& rDate, long nDays )
long operator -( const Date& rDate1, const Date& rDate2 )
{
- ULONG nTempDays1 = DateToDays( rDate1.GetDay(), rDate1.GetMonth(),
+ ULONG nTempDays1 = Date::DateToDays( rDate1.GetDay(), rDate1.GetMonth(),
rDate1.GetYear() );
- ULONG nTempDays2 = DateToDays( rDate2.GetDay(), rDate2.GetMonth(),
+ ULONG nTempDays2 = Date::DateToDays( rDate2.GetDay(), rDate2.GetMonth(),
rDate2.GetYear() );
return nTempDays1 - nTempDays2;
}