From: Johannes Würbach Date: Fri, 27 Nov 2015 19:07:05 +0000 (+0100) Subject: Tests for two-digit time zone offsets X-Git-Tag: 2.11.0~16^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0013e54a1209087a3650f19ebb67338a6e7a79f;p=thirdparty%2Fmoment.git Tests for two-digit time zone offsets --- diff --git a/src/test/moment/is_valid.js b/src/test/moment/is_valid.js index 0f0ba5d39..adf2e5f2f 100644 --- a/src/test/moment/is_valid.js +++ b/src/test/moment/is_valid.js @@ -144,6 +144,8 @@ test('valid string iso 8601 + timezone', function (assert) { '2010-01-30T23:59:59.999+00:00', '2010-01-30T23:59:59.999-07:00', '2010-01-30T00:00:00.000+07:00', + '2010-01-30T23:59:59.999-07', + '2010-01-30T00:00:00.000+07', '2010-01-30 00:00:00.000Z' ], i; diff --git a/src/test/moment/zones.js b/src/test/moment/zones.js index 0d9a2e1b3..e9e0b3414 100644 --- a/src/test/moment/zones.js +++ b/src/test/moment/zones.js @@ -50,6 +50,9 @@ test('set zone with string', function (assert) { zone.zone('2013-03-07T07:00:00+0100'); assert.equal(zone.zone(), -60, 'set the zone with a string that uses the +0000 syntax'); + zone.zone('2013-03-07T07:00:00+02'); + assert.equal(zone.zone(), -120, 'set the zone with a string that uses the +00 syntax'); + zone.zone('03-07-2013T07:00:00-08:00'); assert.equal(zone.zone(), 480, 'set the zone with a string with a non-ISO 8601 date'); });