Expression tests: Date arithmetic

This page tests that the date arithmetic formatting methods work as intended

Results

Base timestamp: 2012-05-30 15:32:43 BST.

Note that the various date arithmetic methods return timestamps in the current timezone even if the input timestamp was in a different one.

Test Expected Actual Result
Add one second 2012-05-30 15:32:44 BST 2012-05-30 15:32:44 BST PASS
Remove one second 2012-05-30 15:32:42 BST 2012-05-30 15:32:42 BST PASS
Add one minute 2012-05-30 15:33:43 BST 2012-05-30 15:33:43 BST PASS
Remove one minute 2012-05-30 15:31:43 BST 2012-05-30 15:31:43 BST PASS
Add 62 minutes 2012-05-30 16:34:43 BST 2012-05-30 16:34:43 BST PASS
Add one day 2012-05-31 15:32:43 BST 2012-05-31 15:32:43 BST PASS
Add 6 months (into next timezone) 2012-11-30 15:32:43 GMT 2012-11-30 15:32:43 GMT PASS
Add one year 2013-05-30 15:32:43 BST 2013-05-30 15:32:43 BST PASS