[Libreoffice-commits] core.git: 2 commits - basic/qa basic/source
Eike Rathke
erack at redhat.com
Wed May 3 14:38:20 UTC 2017
basic/qa/basic_coverage/test_cdatetofromiso_methods.vb | 2 ++
basic/source/runtime/methods.cxx | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
New commits:
commit cc0ea8bb251c464d55e831ed7e11a2f3f7371d38
Author: Eike Rathke <erack at redhat.com>
Date: Wed May 3 16:36:20 2017 +0200
More likely month pos first
Change-Id: I0033c176071642f8df245307af79b8505644a004
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 43548c05edb9..f0166383c14e 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2092,7 +2092,7 @@ RTLFUNC(CDateFromIso)
if (!comphelper::string::isdigitAsciiString(aStr))
break;
- const sal_Int32 nMonthPos = (nLen == 6 ? 2 : (nLen == 9 ? 5 : 4));
+ const sal_Int32 nMonthPos = (nLen == 8 ? 4 : (nLen == 6 ? 2 : 5));
if (nMonthPos == 2)
bUseTwoDigitYear = true;
aYearStr = aStr.copy( 0, nMonthPos );
commit c52f2780b5983cdbafabfcf97eb6fc2c6d934b51
Author: Eike Rathke <erack at redhat.com>
Date: Wed May 3 16:35:13 2017 +0200
Add two digit year test for CDateToIso()
Change-Id: I69f067327504023a2f2439a73cdb1fc6a703aa39
diff --git a/basic/qa/basic_coverage/test_cdatetofromiso_methods.vb b/basic/qa/basic_coverage/test_cdatetofromiso_methods.vb
index 7036762743e1..d2f4ce9c7816 100644
--- a/basic/qa/basic_coverage/test_cdatetofromiso_methods.vb
+++ b/basic/qa/basic_coverage/test_cdatetofromiso_methods.vb
@@ -32,6 +32,8 @@ Function doUnitTest as Integer
doUnitTest = 0
ElseIf ( CDateToIso( CDateFromIso("-00011231") ) <> "-00011231" ) Then
doUnitTest = 0
+ ElseIf ( CDateToIso( CDateFromIso("991231") ) <> "19991231" ) Then
+ doUnitTest = 0
Else
doUnitTest = 1
End If
More information about the Libreoffice-commits
mailing list