]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Fix test for DST
authorMatt Johnson <mj1856@hotmail.com>
Sun, 13 Mar 2016 02:39:56 +0000 (18:39 -0800)
committerIskren Chernev <iskren.chernev@gmail.com>
Thu, 24 Mar 2016 10:57:09 +0000 (03:57 -0700)
src/test/moment/preparse_postformat.js

index 87c2fe010d4b02c1330916a8ecccf173c8605089..b43fffa6d550197326d74c200591699531ec3950 100644 (file)
@@ -59,12 +59,12 @@ test('transform from', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
+    var a = moment().hours(12).minutes(0).seconds(0);
 
-    assert.equal(moment(a).calendar(),                   'Today at @:)) AM',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at @:@% AM',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at #:)) AM',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at @:)) AM',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at !:)) AM',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at @:)) AM', 'yesterday at the same time');
+    assert.equal(moment(a).calendar(),                   'Today at !@:)) PM',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at !@:@% PM',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at !:)) PM',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at !@:)) PM',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at !!:)) AM',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at !@:)) PM', 'yesterday at the same time');
 });