summaryrefslogtreecommitdiff
path: root/basic/qa
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-05-02 15:53:04 +0200
committerEike Rathke <erack@redhat.com>2017-05-02 15:56:20 +0200
commit1b13548f33720d80f53d493f6d70cbcce6b1a0fb (patch)
tree0b797dde491986b97a94b96ed4fb83a6295c1a72 /basic/qa
parentd2007136587a8722d0e7045828bca6a6d82fd244 (diff)
BASIC: handle the full tools::Date range from -32768-01-01 to 32767-12-31
* Input of two-digit years only possible through CDateFromIso() though to maintain compatibility with previous behavior and also VBA mode. * VBA mode restricted to years 1..9999 Change-Id: Ia9574c3bf136619b4831b349d263c96b162d1ed4
Diffstat (limited to 'basic/qa')
-rw-r--r--basic/qa/basic_coverage/test_cdatetofromiso_methods.vb20
1 files changed, 20 insertions, 0 deletions
diff --git a/basic/qa/basic_coverage/test_cdatetofromiso_methods.vb b/basic/qa/basic_coverage/test_cdatetofromiso_methods.vb
index 3eb5e63e83ff..7036762743e1 100644
--- a/basic/qa/basic_coverage/test_cdatetofromiso_methods.vb
+++ b/basic/qa/basic_coverage/test_cdatetofromiso_methods.vb
@@ -12,6 +12,26 @@ Function doUnitTest as Integer
doUnitTest = 0
ElseIf ( CDateToIso( CDateFromIso("2016-10-16") ) <> "20161016" ) Then
doUnitTest = 0
+ ElseIf ( CDateToIso( CDateFromIso("-2016-10-16") ) <> "-20161016" ) Then
+ doUnitTest = 0
+ ElseIf ( CDateToIso( CDateFromIso("-20161016") ) <> "-20161016" ) Then
+ doUnitTest = 0
+ ElseIf ( CDateToIso( CDateFromIso("12016-10-16") ) <> "120161016" ) Then
+ doUnitTest = 0
+ ElseIf ( CDateToIso( CDateFromIso("120161016") ) <> "120161016" ) Then
+ doUnitTest = 0
+ ElseIf ( CDateToIso( CDateFromIso("-12016-10-16") ) <> "-120161016" ) Then
+ doUnitTest = 0
+ ElseIf ( CDateToIso( CDateFromIso("-120161016") ) <> "-120161016" ) Then
+ doUnitTest = 0
+ ElseIf ( CDateToIso( CDateFromIso("0001-01-01") ) <> "00010101" ) Then
+ doUnitTest = 0
+ ElseIf ( CDateToIso( CDateFromIso("00010101") ) <> "00010101" ) Then
+ doUnitTest = 0
+ ElseIf ( CDateToIso( CDateFromIso("-0001-12-31") ) <> "-00011231" ) Then
+ doUnitTest = 0
+ ElseIf ( CDateToIso( CDateFromIso("-00011231") ) <> "-00011231" ) Then
+ doUnitTest = 0
Else
doUnitTest = 1
End If