]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Tests for two-digit time zone offsets
authorJohannes Würbach <johannes.wuerbach@googlemail.com>
Fri, 27 Nov 2015 19:07:05 +0000 (20:07 +0100)
committerIskren Chernev <iskren.chernev@gmail.com>
Wed, 9 Dec 2015 08:23:39 +0000 (00:23 -0800)
src/test/moment/is_valid.js
src/test/moment/zones.js

index 0f0ba5d398f1145e603f8daf88bb8821682b830f..adf2e5f2fab04a212aca5f414f5ae7563d70a55d 100644 (file)
@@ -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;
 
index 0d9a2e1b354479ab2b353c0b1fb7691bfce2ba4c..e9e0b3414e7089317e2ca1ba465815843afbc98a 100644 (file)
@@ -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');
 });