From 8ed930c57a89fa77d4420a95101493cc19377b1c Mon Sep 17 00:00:00 2001 From: Matt Johnson Date: Sat, 12 Mar 2016 18:39:56 -0800 Subject: [PATCH] Fix test for DST --- src/test/moment/preparse_postformat.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test/moment/preparse_postformat.js b/src/test/moment/preparse_postformat.js index 87c2fe010..b43fffa6d 100644 --- a/src/test/moment/preparse_postformat.js +++ b/src/test/moment/preparse_postformat.js @@ -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'); }); -- 2.47.2