expressions: Fix test failures due to new year.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 1 Jan 2011 21:42:04 +0000 (13:42 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 1 Jan 2011 21:42:36 +0000 (13:42 -0800)
Some of the date-related test cases assumed that year 41 would be
interpreted as 1941, but due to the 30-year century window, as soon as it
became 2011 this assumption failed.  Write these years explicitly as 1941
instead to fix the problem.

tests/language/expressions/evaluate.at

index 8932aa6d016197c846e77fbc86eddc9cd1107286..efa715296d309fb53ea5d3908d3aedc93b9fca0c 100644 (file)
@@ -1281,7 +1281,7 @@ CHECK_EXPR_EVAL([xdate],
   [[xdate.date(date.mdy(10,7,1943) + time.hms(2,57,52)) / 86400], [131845.00]],
   [[xdate.date(date.mdy(3,17,1992) + time.hms(16,45,44)) / 86400], [149539.00]],
   [[xdate.date(date.mdy(2,25,1996) + time.hms(21,30,57)) / 86400], [150979.00]],
-  [[xdate.date(date.mdy(9,29,41) + time.hms(4,25,9)) / 86400], [131107.00]],
+  [[xdate.date(date.mdy(9,29,1941) + time.hms(4,25,9)) / 86400], [131107.00]],
   [[xdate.date(date.mdy(4,19,43) + time.hms(6,49,27)) / 86400], [131674.00]],
   [[xdate.date(date.mdy(10,7,43) + time.hms(2,57,52)) / 86400], [131845.00]],
   [[xdate.date(date.mdy(3,17,92) + time.hms(16,45,44)) / 86400], [149539.00]],
@@ -1305,7 +1305,7 @@ CHECK_EXPR_EVAL([xdate],
   [[xdate.hour(date.mdy(10,7,1943) + time.hms(2,57,52))], [2.00]],
   [[xdate.hour(date.mdy(3,17,1992) + time.hms(16,45,44))], [16.00]],
   [[xdate.hour(date.mdy(2,25,1996) + time.hms(21,30,57))], [21.00]],
-  [[xdate.hour(date.mdy(9,29,41) + time.hms(4,25,9))], [4.00]],
+  [[xdate.hour(date.mdy(9,29,1941) + time.hms(4,25,9))], [4.00]],
   [[xdate.hour(date.mdy(4,19,43) + time.hms(6,49,27))], [6.00]],
   [[xdate.hour(date.mdy(10,7,43) + time.hms(2,57,52))], [2.00]],
   [[xdate.hour(date.mdy(3,17,92) + time.hms(16,45,44))], [16.00]],
@@ -1331,7 +1331,7 @@ CHECK_EXPR_EVAL([xdate],
   [[xdate.jday(date.mdy(10,7,1943) + time.hms(2,57,52))], [280.00]],
   [[xdate.jday(date.mdy(3,17,1992) + time.hms(16,45,44))], [77.00]],
   [[xdate.jday(date.mdy(2,25,1996) + time.hms(21,30,57))], [56.00]],
-  [[xdate.jday(date.mdy(9,29,41) + time.hms(4,25,9))], [272.00]],
+  [[xdate.jday(date.mdy(9,29,1941) + time.hms(4,25,9))], [272.00]],
   [[xdate.jday(date.mdy(4,19,43) + time.hms(6,49,27))], [109.00]],
   [[xdate.jday(date.mdy(10,7,43) + time.hms(2,57,52))], [280.00]],
   [[xdate.jday(date.mdy(3,17,92) + time.hms(16,45,44))], [77.00]],
@@ -1355,7 +1355,7 @@ CHECK_EXPR_EVAL([xdate],
   [[xdate.mday(date.mdy(10,7,1943) + time.hms(2,57,52))], [7.00]],
   [[xdate.mday(date.mdy(3,17,1992) + time.hms(16,45,44))], [17.00]],
   [[xdate.mday(date.mdy(2,25,1996) + time.hms(21,30,57))], [25.00]],
-  [[xdate.mday(date.mdy(9,29,41) + time.hms(4,25,9))], [29.00]],
+  [[xdate.mday(date.mdy(9,29,1941) + time.hms(4,25,9))], [29.00]],
   [[xdate.mday(date.mdy(4,19,43) + time.hms(6,49,27))], [19.00]],
   [[xdate.mday(date.mdy(10,7,43) + time.hms(2,57,52))], [7.00]],
   [[xdate.mday(date.mdy(3,17,92) + time.hms(16,45,44))], [17.00]],
@@ -1376,7 +1376,7 @@ CHECK_EXPR_EVAL([xdate],
   [[xdate.minute(date.mdy(10,7,1943) + time.hms(2,57,52))], [57.00]],
   [[xdate.minute(date.mdy(3,17,1992) + time.hms(16,45,44))], [45.00]],
   [[xdate.minute(date.mdy(2,25,1996) + time.hms(21,30,57))], [30.00]],
-  [[xdate.minute(date.mdy(9,29,41) + time.hms(4,25,9))], [25.00]],
+  [[xdate.minute(date.mdy(9,29,1941) + time.hms(4,25,9))], [25.00]],
   [[xdate.minute(date.mdy(4,19,43) + time.hms(6,49,27))], [49.00]],
   [[xdate.minute(date.mdy(10,7,43) + time.hms(2,57,52))], [57.00]],
   [[xdate.minute(date.mdy(3,17,92) + time.hms(16,45,44))], [45.00]],
@@ -1397,7 +1397,7 @@ CHECK_EXPR_EVAL([xdate],
   [[xdate.month(date.mdy(10,7,1943) + time.hms(2,57,52))], [10.00]],
   [[xdate.month(date.mdy(3,17,1992) + time.hms(16,45,44))], [3.00]],
   [[xdate.month(date.mdy(2,25,1996) + time.hms(21,30,57))], [2.00]],
-  [[xdate.month(date.mdy(9,29,41) + time.hms(4,25,9))], [9.00]],
+  [[xdate.month(date.mdy(9,29,1941) + time.hms(4,25,9))], [9.00]],
   [[xdate.month(date.mdy(4,19,43) + time.hms(6,49,27))], [4.00]],
   [[xdate.month(date.mdy(10,7,43) + time.hms(2,57,52))], [10.00]],
   [[xdate.month(date.mdy(3,17,92) + time.hms(16,45,44))], [3.00]],
@@ -1418,7 +1418,7 @@ CHECK_EXPR_EVAL([xdate],
   [[xdate.quarter(date.mdy(10,7,1943) + time.hms(2,57,52))], [4.00]],
   [[xdate.quarter(date.mdy(3,17,1992) + time.hms(16,45,44))], [1.00]],
   [[xdate.quarter(date.mdy(2,25,1996) + time.hms(21,30,57))], [1.00]],
-  [[xdate.quarter(date.mdy(9,29,41) + time.hms(4,25,9))], [3.00]],
+  [[xdate.quarter(date.mdy(9,29,1941) + time.hms(4,25,9))], [3.00]],
   [[xdate.quarter(date.mdy(4,19,43) + time.hms(6,49,27))], [2.00]],
   [[xdate.quarter(date.mdy(10,7,43) + time.hms(2,57,52))], [4.00]],
   [[xdate.quarter(date.mdy(3,17,92) + time.hms(16,45,44))], [1.00]],
@@ -1439,7 +1439,7 @@ CHECK_EXPR_EVAL([xdate],
   [[xdate.second(date.mdy(10,7,1943) + time.hms(2,57,52))], [52.00]],
   [[xdate.second(date.mdy(3,17,1992) + time.hms(16,45,44))], [44.00]],
   [[xdate.second(date.mdy(2,25,1996) + time.hms(21,30,57))], [57.00]],
-  [[xdate.second(date.mdy(9,29,41) + time.hms(4,25,9))], [9.00]],
+  [[xdate.second(date.mdy(9,29,1941) + time.hms(4,25,9))], [9.00]],
   [[xdate.second(date.mdy(4,19,43) + time.hms(6,49,27))], [27.00]],
   [[xdate.second(date.mdy(10,7,43) + time.hms(2,57,52))], [52.00]],
   [[xdate.second(date.mdy(3,17,92) + time.hms(16,45,44))], [44.00]],
@@ -1460,7 +1460,7 @@ CHECK_EXPR_EVAL([xdate],
   [[xdate.tday(date.mdy(10,7,1943) + time.hms(2,57,52))], [131845.00]],
   [[xdate.tday(date.mdy(3,17,1992) + time.hms(16,45,44))], [149539.00]],
   [[xdate.tday(date.mdy(2,25,1996) + time.hms(21,30,57))], [150979.00]],
-  [[xdate.tday(date.mdy(9,29,41) + time.hms(4,25,9))], [131107.00]],
+  [[xdate.tday(date.mdy(9,29,1941) + time.hms(4,25,9))], [131107.00]],
   [[xdate.tday(date.mdy(4,19,43) + time.hms(6,49,27))], [131674.00]],
   [[xdate.tday(date.mdy(10,7,43) + time.hms(2,57,52))], [131845.00]],
   [[xdate.tday(date.mdy(3,17,92) + time.hms(16,45,44))], [149539.00]],
@@ -1481,7 +1481,7 @@ CHECK_EXPR_EVAL([xdate],
   [[xdate.time(date.mdy(10,7,1943) + time.hms(2,57,52))], [10672.00]],
   [[xdate.time(date.mdy(3,17,1992) + time.hms(16,45,44))], [60344.00]],
   [[xdate.time(date.mdy(2,25,1996) + time.hms(21,30,57))], [77457.00]],
-  [[xdate.time(date.mdy(9,29,41) + time.hms(4,25,9))], [15909.00]],
+  [[xdate.time(date.mdy(9,29,1941) + time.hms(4,25,9))], [15909.00]],
   [[xdate.time(date.mdy(4,19,43) + time.hms(6,49,27))], [24567.00]],
   [[xdate.time(date.mdy(10,7,43) + time.hms(2,57,52))], [10672.00]],
   [[xdate.time(date.mdy(3,17,92) + time.hms(16,45,44))], [60344.00]],
@@ -1502,7 +1502,7 @@ CHECK_EXPR_EVAL([xdate],
   [[xdate.week(date.mdy(10,7,1943) + time.hms(2,57,52))], [40.00]],
   [[xdate.week(date.mdy(3,17,1992) + time.hms(16,45,44))], [11.00]],
   [[xdate.week(date.mdy(2,25,1996) + time.hms(21,30,57))], [8.00]],
-  [[xdate.week(date.mdy(9,29,41) + time.hms(4,25,9))], [39.00]],
+  [[xdate.week(date.mdy(9,29,1941) + time.hms(4,25,9))], [39.00]],
   [[xdate.week(date.mdy(4,19,43) + time.hms(6,49,27))], [16.00]],
   [[xdate.week(date.mdy(10,7,43) + time.hms(2,57,52))], [40.00]],
   [[xdate.week(date.mdy(3,17,92) + time.hms(16,45,44))], [11.00]],
@@ -1523,7 +1523,7 @@ CHECK_EXPR_EVAL([xdate],
   [[xdate.wkday(date.mdy(10,7,1943))], [5.00]],
   [[xdate.wkday(date.mdy(3,17,1992))], [3.00]],
   [[xdate.wkday(date.mdy(2,25,1996))], [1.00]],
-  [[xdate.wkday(date.mdy(9,29,41))], [2.00]],
+  [[xdate.wkday(date.mdy(9,29,1941))], [2.00]],
   [[xdate.wkday(date.mdy(4,19,43))], [2.00]],
   [[xdate.wkday(date.mdy(10,7,43))], [5.00]],
   [[xdate.wkday(date.mdy(3,17,92))], [3.00]],
@@ -1544,7 +1544,7 @@ CHECK_EXPR_EVAL([xdate],
   [[xdate.year(date.mdy(10,7,1943) + time.hms(2,57,52))], [1943.00]],
   [[xdate.year(date.mdy(3,17,1992) + time.hms(16,45,44))], [1992.00]],
   [[xdate.year(date.mdy(2,25,1996) + time.hms(21,30,57))], [1996.00]],
-  [[xdate.year(date.mdy(9,29,41) + time.hms(4,25,9))], [1941.00]],
+  [[xdate.year(date.mdy(9,29,1941) + time.hms(4,25,9))], [1941.00]],
   [[xdate.year(date.mdy(4,19,43) + time.hms(6,49,27))], [1943.00]],
   [[xdate.year(date.mdy(10,7,43) + time.hms(2,57,52))], [1943.00]],
   [[xdate.year(date.mdy(3,17,92) + time.hms(16,45,44))], [1992.00]],
@@ -1565,8 +1565,8 @@ CHECK_EXPR_EVAL([datediff],
   [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'years')], [0.00]],
   [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'years')], [-48.00]],
   [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'years')], [-3.00]],
-  [[datediff(date.mdy(9,29,41), date.mdy(2,25,1996), 'years')], [-54.00]],
-  [[datediff(date.mdy(9,29,41), date.mdy(4,19,43), 'years')], [-1.00]],
+  [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'years')], [-54.00]],
+  [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'years')], [-1.00]],
   [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'years')], [0.00]],
   [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'years')], [-48.00]],
   [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'years')], [-3.00]],
@@ -1588,8 +1588,8 @@ CHECK_EXPR_EVAL([datediff],
   [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'quarters')], [-1.00]],
   [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'quarters')], [-193.00]],
   [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'quarters')], [-15.00]],
-  [[datediff(date.mdy(9,29,41), date.mdy(2,25,1996), 'quarters')], [-217.00]],
-  [[datediff(date.mdy(9,29,41), date.mdy(4,19,43), 'quarters')], [-6.00]],
+  [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'quarters')], [-217.00]],
+  [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'quarters')], [-6.00]],
   [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'quarters')], [-1.00]],
   [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'quarters')], [-193.00]],
   [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'quarters')], [-15.00]],
@@ -1611,8 +1611,8 @@ CHECK_EXPR_EVAL([datediff],
   [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'months')], [-5.00]],
   [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'months')], [-581.00]],
   [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'months')], [-47.00]],
-  [[datediff(date.mdy(9,29,41), date.mdy(2,25,1996), 'months')], [-652.00]],
-  [[datediff(date.mdy(9,29,41), date.mdy(4,19,43), 'months')], [-18.00]],
+  [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'months')], [-652.00]],
+  [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'months')], [-18.00]],
   [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'months')], [-5.00]],
   [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'months')], [-581.00]],
   [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'months')], [-47.00]],
@@ -1634,8 +1634,8 @@ CHECK_EXPR_EVAL([datediff],
   [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'weeks')], [-24.00]],
   [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'weeks')], [-2527.00]],
   [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'weeks')], [-205.00]],
-  [[datediff(date.mdy(9,29,41), date.mdy(2,25,1996), 'weeks')], [-2838.00]],
-  [[datediff(date.mdy(9,29,41), date.mdy(4,19,43), 'weeks')], [-81.00]],
+  [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'weeks')], [-2838.00]],
+  [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'weeks')], [-81.00]],
   [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'weeks')], [-24.00]],
   [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'weeks')], [-2527.00]],
   [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'weeks')], [-205.00]],
@@ -1657,8 +1657,8 @@ CHECK_EXPR_EVAL([datediff],
   [[datediff(date.mdy(4,19,1943), date.mdy(10,7,1943), 'days')], [-171.00]],
   [[datediff(date.mdy(10,7,1943), date.mdy(3,17,1992), 'days')], [-17694.00]],
   [[datediff(date.mdy(3,17,1992), date.mdy(2,25,1996), 'days')], [-1440.00]],
-  [[datediff(date.mdy(9,29,41), date.mdy(2,25,1996), 'days')], [-19872.00]],
-  [[datediff(date.mdy(9,29,41), date.mdy(4,19,43), 'days')], [-567.00]],
+  [[datediff(date.mdy(9,29,1941), date.mdy(2,25,1996), 'days')], [-19872.00]],
+  [[datediff(date.mdy(9,29,1941), date.mdy(4,19,43), 'days')], [-567.00]],
   [[datediff(date.mdy(4,19,43), date.mdy(10,7,43), 'days')], [-171.00]],
   [[datediff(date.mdy(10,7,43), date.mdy(3,17,92), 'days')], [-17694.00]],
   [[datediff(date.mdy(3,17,92), date.mdy(2,25,96), 'days')], [-1440.00]],
@@ -1680,8 +1680,8 @@ CHECK_EXPR_EVAL([datediff],
   [[datediff(date.mdy(10,7,1943), date.mdy(4,19,1943), 'years')], [0.00]],
   [[datediff(date.mdy(3,17,1992), date.mdy(10,7,1943), 'years')], [48.00]],
   [[datediff(date.mdy(2,25,1996), date.mdy(3,17,1992), 'years')], [3.00]],
-  [[datediff(date.mdy(2,25,1996), date.mdy(9,29,41), 'years')], [54.00]],
-  [[datediff(date.mdy(4,19,43), date.mdy(9,29,41), 'years')], [1.00]],
+  [[datediff(date.mdy(2,25,1996), date.mdy(9,29,1941), 'years')], [54.00]],
+  [[datediff(date.mdy(4,19,43), date.mdy(9,29,1941), 'years')], [1.00]],
   [[datediff(date.mdy(10,7,43), date.mdy(4,19,43), 'years')], [0.00]],
   [[datediff(date.mdy(3,17,92), date.mdy(10,7,43), 'years')], [48.00]],
   [[datediff(date.mdy(2,25,96), date.mdy(3,17,92), 'years')], [3.00]],
@@ -1703,8 +1703,8 @@ CHECK_EXPR_EVAL([datediff],
   [[datediff(date.mdy(10,7,1943), date.mdy(4,19,1943), 'months')], [5.00]],
   [[datediff(date.mdy(3,17,1992), date.mdy(10,7,1943), 'months')], [581.00]],
   [[datediff(date.mdy(2,25,1996), date.mdy(3,17,1992), 'months')], [47.00]],
-  [[datediff(date.mdy(2,25,1996), date.mdy(9,29,41), 'months')], [652.00]],
-  [[datediff(date.mdy(4,19,43), date.mdy(9,29,41), 'months')], [18.00]],
+  [[datediff(date.mdy(2,25,1996), date.mdy(9,29,1941), 'months')], [652.00]],
+  [[datediff(date.mdy(4,19,43), date.mdy(9,29,1941), 'months')], [18.00]],
   [[datediff(date.mdy(10,7,43), date.mdy(4,19,43), 'months')], [5.00]],
   [[datediff(date.mdy(3,17,92), date.mdy(10,7,43), 'months')], [581.00]],
   [[datediff(date.mdy(2,25,96), date.mdy(3,17,92), 'months')], [47.00]],
@@ -1726,8 +1726,8 @@ CHECK_EXPR_EVAL([datediff],
   [[datediff(date.mdy(10,7,1943), date.mdy(4,19,1943), 'quarters')], [1.00]],
   [[datediff(date.mdy(3,17,1992), date.mdy(10,7,1943), 'quarters')], [193.00]],
   [[datediff(date.mdy(2,25,1996), date.mdy(3,17,1992), 'quarters')], [15.00]],
-  [[datediff(date.mdy(2,25,1996), date.mdy(9,29,41), 'quarters')], [217.00]],
-  [[datediff(date.mdy(4,19,43), date.mdy(9,29,41), 'quarters')], [6.00]],
+  [[datediff(date.mdy(2,25,1996), date.mdy(9,29,1941), 'quarters')], [217.00]],
+  [[datediff(date.mdy(4,19,43), date.mdy(9,29,1941), 'quarters')], [6.00]],
   [[datediff(date.mdy(10,7,43), date.mdy(4,19,43), 'quarters')], [1.00]],
   [[datediff(date.mdy(3,17,92), date.mdy(10,7,43), 'quarters')], [193.00]],
   [[datediff(date.mdy(2,25,96), date.mdy(3,17,92), 'quarters')], [15.00]],