From: Matt Johnson Date: Sun, 13 Mar 2016 02:39:56 +0000 (-0800) Subject: Fix test for DST X-Git-Tag: 2.13.0~37^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ed930c57a89fa77d4420a95101493cc19377b1c;p=thirdparty%2Fmoment.git Fix test for DST --- 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'); });