#UI_ENHANCEMENT by cg
class: RegressionTests::TimeAndDateTest
changed: #test_13_timestampQueries
--- 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.