#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Thu, 28 Apr 2016 15:43:25 +0200
changeset 1404 e676289d9bb9
parent 1403 09e8d093107c
child 1405 e9ca346e3642
#UI_ENHANCEMENT by cg class: RegressionTests::TimeAndDateTest changed: #test_13_timestampQueries
RegressionTests__TimeAndDateTest.st
--- a/RegressionTests__TimeAndDateTest.st	Tue Apr 26 17:54:00 2016 +0200
+++ b/RegressionTests__TimeAndDateTest.st	Thu Apr 28 15:43:25 2016 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "{ Package: 'exept:regression' }"
 
 "{ NameSpace: RegressionTests }"
@@ -625,6 +623,18 @@
     self assert:d2 asDate isLeapYear not.
     self assert:(d2 - d1) days = 366.
 
+    d1 := Timestamp newDay:1 month:1 year:1969.
+    d2 := Timestamp newDay:1 month:1 year:1970.   
+    self assert:d1 asDate isLeapYear not.
+    self assert:d2 asDate isLeapYear not.
+    self assert:(d2 - d1) days = 365.
+
+    d1 := Timestamp newDay:1 month:1 year:1600.
+    d2 := Timestamp newDay:1 month:1 year:1601.   
+    self assert:d1 asDate isLeapYear.
+    self assert:d2 asDate isLeapYear not.
+    self assert:(d2 - d1) days = 366.
+
     "/ local time vs. utc time
     local := Timestamp newDay:1 month:1 year:1940.
     utc := UtcTimestamp newDay:1 month:1 year:1940.