]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
All test files pass jscs 1718/head
authorIskren Chernev <iskren.chernev@gmail.com>
Thu, 19 Jun 2014 08:26:20 +0000 (01:26 -0700)
committerIskren Chernev <iskren.chernev@gmail.com>
Thu, 19 Jun 2014 08:36:56 +0000 (01:36 -0700)
79 files changed:
test/lang/ar-ma.js
test/lang/ar-sa.js
test/lang/ar.js
test/lang/az.js
test/lang/bg.js
test/lang/bn.js
test/lang/br.js
test/lang/bs.js
test/lang/ca.js
test/lang/cs.js
test/lang/cv.js
test/lang/cy.js
test/lang/de-at.js
test/lang/de.js
test/lang/el.js
test/lang/en-au.js
test/lang/en-ca.js
test/lang/en-gb.js
test/lang/en.js
test/lang/eo.js
test/lang/es.js
test/lang/et.js
test/lang/eu.js
test/lang/fa.js
test/lang/fi.js
test/lang/fr-ca.js
test/lang/fr.js
test/lang/gl.js
test/lang/he.js
test/lang/hi.js
test/lang/hr.js
test/lang/hu.js
test/lang/hy-am.js
test/lang/id.js
test/lang/is.js
test/lang/it.js
test/lang/ja.js
test/lang/ka.js
test/lang/km.js
test/lang/ko.js
test/lang/lb.js
test/lang/lt.js
test/lang/lv.js
test/lang/mk.js
test/lang/ml.js
test/lang/mr.js
test/lang/ms-my.js
test/lang/nb.js
test/lang/ne.js
test/lang/nl.js
test/lang/nn.js
test/lang/pl.js
test/lang/pt-br.js
test/lang/pt.js
test/lang/ro.js
test/lang/ru.js
test/lang/sk.js
test/lang/sl.js
test/lang/sq.js
test/lang/sr-cyrl.js
test/lang/sr.js
test/lang/sv.js
test/lang/ta.js
test/lang/th.js
test/lang/tl-ph.js
test/lang/tr.js
test/lang/tzm-latn.js
test/lang/tzm.js
test/lang/uk.js
test/lang/uz.js
test/lang/vi.js
test/lang/zh-cn.js
test/lang/zh-tw.js
test/moment/create.js
test/moment/format.js
test/moment/getters_setters.js
test/moment/mutable.js
test/moment/preparse_postformat.js
test/moment/string_prototype.js

index 25d0238034268630ef99f92e799f2656e0022fa1..9b0cda61700c132f86e7d4e893a2b4afb5b694b6 100644 (file)
@@ -177,11 +177,11 @@ exports["lang:ar-ma"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "اليوم على الساعة 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "اليوم على الساعة 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "اليوم على الساعة 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "غدا على الساعة 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "اليوم على الساعة 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "أمس على الساعة 02:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "اليوم على الساعة 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "اليوم على الساعة 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "غدا على الساعة 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "اليوم على الساعة 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "أمس على الساعة 02:00", "yesterday at the same time");
         test.done();
     },
 
@@ -189,7 +189,7 @@ exports["lang:ar-ma"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [على الساعة] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [على الساعة] LT'),  "Today + " + i + " days beginning of day");
@@ -214,14 +214,14 @@ exports["lang:ar-ma"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 21a8e3652d2505ba83619710254ee9c92255d82d..009154d5e7127b037252003e2379e1a39e9ae8aa 100644 (file)
@@ -191,11 +191,11 @@ exports["lang:ar-sa"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "اليوم على الساعة ٠٢:٠٠",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "اليوم على الساعة ٠٢:٢٥",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "اليوم على الساعة ٠٣:٠٠",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "غدا على الساعة ٠٢:٠٠",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "اليوم على الساعة ٠١:٠٠",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "أمس على الساعة ٠٢:٠٠", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "اليوم على الساعة ٠٢:٢٥",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "اليوم على الساعة ٠٣:٠٠",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "غدا على الساعة ٠٢:٠٠",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "اليوم على الساعة ٠١:٠٠",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "أمس على الساعة ٠٢:٠٠", "yesterday at the same time");
         test.done();
     },
 
@@ -204,7 +204,7 @@ exports["lang:ar-sa"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [على الساعة] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [على الساعة] LT'),  "Today + " + i + " days beginning of day");
@@ -219,7 +219,7 @@ exports["lang:ar-sa"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [على الساعة] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [على الساعة] LT'),  "Today - " + i + " days beginning of day");
@@ -232,14 +232,14 @@ exports["lang:ar-sa"] = {
     "calendar all else" : function (test) {
         test.expect(4);
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 77fa3bb96070673e5c658af6470c2b2db4159d13..c85fabd6a837f69bcc9260347c035c1085d804b2 100644 (file)
@@ -180,11 +180,11 @@ exports["lang:ar"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "اليوم على الساعة ٠٢:٠٠",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "اليوم على الساعة ٠٢:٢٥",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "اليوم على الساعة ٠٣:٠٠",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "غدا على الساعة ٠٢:٠٠",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "اليوم على الساعة ٠١:٠٠",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "أمس على الساعة ٠٢:٠٠", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "اليوم على الساعة ٠٢:٢٥",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "اليوم على الساعة ٠٣:٠٠",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "غدا على الساعة ٠٢:٠٠",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "اليوم على الساعة ٠١:٠٠",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "أمس على الساعة ٠٢:٠٠", "yesterday at the same time");
         test.done();
     },
 
@@ -192,7 +192,7 @@ exports["lang:ar"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [على الساعة] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [على الساعة] LT'),  "Today + " + i + " days beginning of day");
@@ -206,7 +206,7 @@ exports["lang:ar"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [على الساعة] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [على الساعة] LT'),  "Today - " + i + " days beginning of day");
@@ -218,14 +218,14 @@ exports["lang:ar"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 0a3ec2a4b39541aeb2ab46ac264bb5394bfbdb91..15554d79d634cbc341b2aad675607f95c9f25a44 100644 (file)
@@ -204,11 +204,11 @@ exports["lang:az"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "bugün saat 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "bugün saat 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "bugün saat 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "sabah saat 02:00",     "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "bugün saat 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "dünən 02:00",          "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "bugün saat 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "bugün saat 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "sabah saat 02:00",     "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "bugün saat 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "dünən 02:00",          "yesterday at the same time");
         test.done();
     },
 
@@ -217,7 +217,7 @@ exports["lang:az"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('[gələn həftə] dddd [saat] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[gələn həftə] dddd [saat] LT'),  "Today + " + i + " days beginning of day");
@@ -232,7 +232,7 @@ exports["lang:az"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[keçən həftə] dddd [saat] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[keçən həftə] dddd [saat] LT'),  "Today - " + i + " days beginning of day");
@@ -245,14 +245,14 @@ exports["lang:az"] = {
     "calendar all else" : function (test) {
         test.expect(4);
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index addebcbe2e98fca8a34673f0b50c1e88bf93cc98..68f30f07cffb3dfad5e082c7873cdd7f3684f898 100644 (file)
@@ -180,11 +180,11 @@ exports["lang:bg"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Днес в 2:00",  "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Днес в 2:25",  "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Днес в 3:00",  "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Утре в 2:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Днес в 1:00",  "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Вчера в 2:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Днес в 2:25",  "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Днес в 3:00",  "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Утре в 2:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Днес в 1:00",  "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Вчера в 2:00", "yesterday at the same time");
         test.done();
     },
 
@@ -192,7 +192,7 @@ exports["lang:bg"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [в] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [в] LT'),  "Today + " + i + " days beginning of day");
@@ -221,7 +221,7 @@ exports["lang:bg"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days beginning of day");
@@ -232,14 +232,14 @@ exports["lang:bg"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 8cfea88c6a2212f8efe98722c3db28d732e2313e..487cb7f0d3ed5583492f14df9fe160e543e95189 100644 (file)
@@ -65,7 +65,7 @@ exports["lang:bn"] = {
                 ['ll',                                 '১৪ ফেব ২০১০'],
                 ['lll',                                '১৪ ফেব ২০১০, দুপুর ৩:২৫ সময়'],
                 ['llll',                               'রবি, ১৪ ফেব ২০১০, দুপুর ৩:২৫ সময়']
-             ],
+            ],
             b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
             i;
         for (i = 0; i < a.length; i++) {
@@ -192,11 +192,11 @@ exports["lang:bn"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "আজ রাত ২:০০ সময়",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "আজ রাত ২:২৫ সময়",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 3 }).calendar(),       "আজ শকাল ৫:০০ সময়",     "Now plus 3 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "আগামীকাল রাত ২:০০ সময়",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "আজ রাত ১:০০ সময়",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "গতকাল রাত ২:০০ সময়", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "আজ রাত ২:২৫ সময়",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 3}).calendar(),       "আজ শকাল ৫:০০ সময়",     "Now plus 3 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "আগামীকাল রাত ২:০০ সময়",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "আজ রাত ১:০০ সময়",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "গতকাল রাত ২:০০ সময়", "yesterday at the same time");
         test.done();
     },
     "calendar next week" : function (test) {
@@ -204,7 +204,7 @@ exports["lang:bn"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd[,] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd[,] LT'),  "Today + " + i + " days beginning of day");
@@ -220,7 +220,7 @@ exports["lang:bn"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[গত] dddd[,] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[গত] dddd[,] LT'),  "Today - " + i + " days beginning of day");
@@ -232,14 +232,14 @@ exports["lang:bn"] = {
 
     "calendar all else" : function (test) {
         test.expect(4);
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index e41bc47a98a152e0ff9e0b40600e5953c2e73581..565293989a66e59982eb1d74b7127de7f11ad7e1 100644 (file)
@@ -184,11 +184,11 @@ exports["lang:br"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Hiziv da 2e00 AM",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Hiziv da 2e25 AM",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Hiziv da 3e00 AM",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Warc'hoazh da 2e00 AM",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Hiziv da 1e00 AM",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Dec'h da 2e00 AM", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Hiziv da 2e25 AM",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Hiziv da 3e00 AM",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Warc'hoazh da 2e00 AM",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Hiziv da 1e00 AM",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Dec'h da 2e00 AM", "yesterday at the same time");
         test.done();
     },
 
@@ -197,7 +197,7 @@ exports["lang:br"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [da] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [da] LT'),  "Today + " + i + " days beginning of day");
@@ -212,7 +212,7 @@ exports["lang:br"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [paset da] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [paset da] LT'),  "Today - " + i + " days beginning of day");
@@ -224,14 +224,14 @@ exports["lang:br"] = {
 
     "calendar all else" : function (test) {
         moment.lang('br');
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 19018d8b0840ea8e370596f22c4ee99f2552f953..4aafd24496d5f3c104cf4971624f46a98589f11c 100644 (file)
@@ -181,11 +181,11 @@ exports["lang:bs"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "danas u 2:00",  "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "danas u 2:25",  "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "danas u 3:00",  "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "sutra u 2:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "danas u 1:00",  "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "jučer u 2:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "danas u 2:25",  "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "danas u 3:00",  "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "sutra u 2:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "danas u 1:00",  "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "jučer u 2:00", "yesterday at the same time");
         test.done();
     },
 
@@ -210,7 +210,7 @@ exports["lang:bs"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days beginning of day");
@@ -240,7 +240,7 @@ exports["lang:bs"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days beginning of day");
@@ -252,14 +252,14 @@ exports["lang:bs"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 03c95fa2322cc06f7bfdb0b45c0551ef0dac25ec..b1bba37398e8204d2da5085e8c70313e0c5748a7 100644 (file)
@@ -148,12 +148,12 @@ exports["lang:ca"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                         "avui a les 2:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),          "avui a les 2:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),           "avui a les 3:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),           "demà a les 2:00",  "tomorrow at the same time");
-        test.equal(moment(a).add({ d: 1, h : -1 }).calendar(),   "demà a la 1:00",   "tomorrow minus 1 hour");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),      "avui a la 1:00",      "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),      "ahir a les 2:00",    "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),          "avui a les 2:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),           "avui a les 3:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),           "demà a les 2:00",  "tomorrow at the same time");
+        test.equal(moment(a).add({d: 1, h : -1}).calendar(),   "demà a la 1:00",   "tomorrow minus 1 hour");
+        test.equal(moment(a).subtract({h: 1}).calendar(),      "avui a la 1:00",      "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),      "ahir a les 2:00",    "yesterday at the same time");
         test.done();
     },
 
@@ -161,7 +161,7 @@ exports["lang:ca"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'),  "Today + " + i + " days beginning of day");
@@ -175,7 +175,7 @@ exports["lang:ca"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'),  "Today - " + i + " days beginning of day");
@@ -186,14 +186,14 @@ exports["lang:ca"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 0640afd91cc860c49371e6243c7bb9ae8a367629..594e5023477fadb630ad7eb4df75eca913de995b 100644 (file)
@@ -214,11 +214,11 @@ exports["lang:cs"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "dnes v 2.00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "dnes v 2.25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "dnes v 3.00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "zítra v 2.00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "dnes v 1.00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "včera v 2.00",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "dnes v 2.25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "dnes v 3.00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "zítra v 2.00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "dnes v 1.00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "včera v 2.00",     "yesterday at the same time");
         test.done();
     },
 
@@ -226,7 +226,7 @@ exports["lang:cs"] = {
 
         var i, m, nextDay;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             nextDay = '';
             switch (m.day()) {
             case 0:
@@ -264,7 +264,7 @@ exports["lang:cs"] = {
 
         var i, m, lastDay;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             lastDay = '';
             switch (m.day()) {
             case 0:
@@ -299,14 +299,14 @@ exports["lang:cs"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 4d398b7920ec2cd2eee09ff359dfabba126a299c..18f38d1388d46474971e805694a98d9a10c21f5f 100644 (file)
@@ -186,11 +186,11 @@ exports["lang:cv"] = {
     "calendar day" : function (test) {
         var a = moment().hours(2).minutes(0).seconds(0);
         test.equal(moment(a).calendar(),                     "Паян 02:00 сехетре",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Паян 02:25 сехетре",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Паян 03:00 сехетре",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Ыран 02:00 сехетре",     "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Паян 01:00 сехетре",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Ĕнер 02:00 сехетре",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Паян 02:25 сехетре",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Паян 03:00 сехетре",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Ыран 02:00 сехетре",     "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Паян 01:00 сехетре",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Ĕнер 02:00 сехетре",     "yesterday at the same time");
         test.done();
     },
 
@@ -199,7 +199,7 @@ exports["lang:cv"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('[Çитес] dddd LT [сехетре]'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[Çитес] dddd LT [сехетре]'),  "Today + " + i + " days beginning of day");
@@ -214,7 +214,7 @@ exports["lang:cv"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[Иртнĕ] dddd LT [сехетре]'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[Иртнĕ] dddd LT [сехетре]'),  "Today - " + i + " days beginning of day");
@@ -225,14 +225,14 @@ exports["lang:cv"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 2048869f0b83204e3b4ed2b8b8b9f8717622ad43..3f41b249cd2da29d934793107b3b4ff35db22ef3 100644 (file)
@@ -184,11 +184,11 @@ exports["lang:cy"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Heddiw am 02:00",    "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Heddiw am 02:25",    "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Heddiw am 03:00",    "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Yfory am 02:00",         "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Heddiw am 01:00",    "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Ddoe am 02:00",           "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Heddiw am 02:25",    "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Heddiw am 03:00",    "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Yfory am 02:00",         "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Heddiw am 01:00",    "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Ddoe am 02:00",           "yesterday at the same time");
         test.done();
     },
 
@@ -197,7 +197,7 @@ exports["lang:cy"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [am] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [am] LT'),  "Today + " + i + " days beginning of day");
@@ -212,7 +212,7 @@ exports["lang:cy"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [diwethaf am] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [diwethaf am] LT'),  "Today - " + i + " days beginning of day");
@@ -223,14 +223,14 @@ exports["lang:cy"] = {
     },
 
     "same all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 1b302801427e703408b9cf23674970882ef3a2aa..5311e0577b0195635de1040529afbefac694c286 100644 (file)
@@ -189,11 +189,11 @@ exports["lang:de-at"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(), "Heute um 02:00 Uhr", "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(), "Heute um 02:25 Uhr", "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(), "Heute um 03:00 Uhr", "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(), "Morgen um 02:00 Uhr", "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(), "Heute um 01:00 Uhr", "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(), "Gestern um 02:00 Uhr", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(), "Heute um 02:25 Uhr", "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(), "Heute um 03:00 Uhr", "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(), "Morgen um 02:00 Uhr", "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(), "Heute um 01:00 Uhr", "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(), "Gestern um 02:00 Uhr", "yesterday at the same time");
         test.done();
     },
 
@@ -202,7 +202,7 @@ exports["lang:de-at"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(), m.format('dddd [um] LT'), "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(), m.format('dddd [um] LT'), "Today + " + i + " days beginning of day");
@@ -217,7 +217,7 @@ exports["lang:de-at"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(), m.format('[letzten] dddd [um] LT'), "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(), m.format('[letzten] dddd [um] LT'), "Today + " + i + " days beginning of day");
@@ -230,14 +230,14 @@ exports["lang:de-at"] = {
     "calendar all else": function (test) {
         test.expect(4);
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
         test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
         test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
index a669c8ac92fe58d112bbd02fbcc7bbcd239be046..39406284026fd2c4a1704bde177a791600aa7f5d 100644 (file)
@@ -180,11 +180,11 @@ exports["lang:de"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Heute um 02:00 Uhr",   "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Heute um 02:25 Uhr",   "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Heute um 03:00 Uhr",   "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Morgen um 02:00 Uhr",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Heute um 01:00 Uhr",   "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Gestern um 02:00 Uhr", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Heute um 02:25 Uhr",   "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Heute um 03:00 Uhr",   "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Morgen um 02:00 Uhr",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Heute um 01:00 Uhr",   "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Gestern um 02:00 Uhr", "yesterday at the same time");
         test.done();
     },
 
@@ -192,7 +192,7 @@ exports["lang:de"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [um] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [um] LT'),  "Today + " + i + " days beginning of day");
@@ -206,7 +206,7 @@ exports["lang:de"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[letzten] dddd [um] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[letzten] dddd [um] LT'),  "Today + " + i + " days beginning of day");
@@ -218,14 +218,14 @@ exports["lang:de"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 46ddd0569bcc7d4a9f985f16b83618acb5423104..0b731875d389f69987aa3de130e8aa96e6e8456f 100644 (file)
@@ -207,11 +207,11 @@ exports["lang:el"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Σήμερα στις 2:00 ΠΜ",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Σήμερα στις 2:25 ΠΜ",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Σήμερα στις 3:00 ΠΜ",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Αύριο στις 2:00 ΠΜ",      "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Σήμερα στη 1:00 ΠΜ",        "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Χθες στις 2:00 ΠΜ",       "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Σήμερα στις 2:25 ΠΜ",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Σήμερα στις 3:00 ΠΜ",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Αύριο στις 2:00 ΠΜ",      "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Σήμερα στη 1:00 ΠΜ",        "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Χθες στις 2:00 ΠΜ",       "yesterday at the same time");
 
         test.done();
     },
@@ -220,7 +220,7 @@ exports["lang:el"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [' + (m.hours() % 12 === 1 ? 'στη' : 'στις') + '] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [στις] LT'),  "Today + " + i + " days beginning of day");
@@ -232,10 +232,10 @@ exports["lang:el"] = {
 
     "calendar last week" : function (test) {
 
-        var i, m;
+        var i, m, dayString;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
-            var dayString = m.day() === 6 ? '[το προηγούμενο Σάββατο]' : '[την προηγούμενη] dddd';
+            m = moment().subtract({d: i});
+            dayString = m.day() === 6 ? '[το προηγούμενο Σάββατο]' : '[την προηγούμενη] dddd';
             test.equal(m.calendar(),       m.format(dayString + ' [' + (m.hours() % 12 === 1 ? 'στη' : 'στις') + '] LT'),  "Today - " + i + " days current time");
             m.hours(1).minutes(30).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(dayString + ' [στη] LT'),  "Today - " + i + " days one o clock");
@@ -249,14 +249,14 @@ exports["lang:el"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index a130f99e2e40573afcd8184a83e2aebed0e3b920..0edaf18f44285fefb2c2f8d9cf06d759f82709f9 100644 (file)
@@ -180,11 +180,11 @@ exports["lang:en-au"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Today at 2:00 AM",      "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Today at 2:25 AM",      "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Today at 3:00 AM",      "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Tomorrow at 2:00 AM",   "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Today at 1:00 AM",      "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Yesterday at 2:00 AM",  "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Today at 2:25 AM",      "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Today at 3:00 AM",      "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Tomorrow at 2:00 AM",   "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Today at 1:00 AM",      "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Yesterday at 2:00 AM",  "yesterday at the same time");
         test.done();
     },
 
@@ -192,7 +192,7 @@ exports["lang:en-au"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [at] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [at] LT'),  "Today + " + i + " days beginning of day");
@@ -207,7 +207,7 @@ exports["lang:en-au"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[Last] dddd [at] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[Last] dddd [at] LT'),  "Today - " + i + " days beginning of day");
@@ -219,14 +219,14 @@ exports["lang:en-au"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 2093948f0f0024f61c3997a3db0f9c9805145cf7..60f0f4d213992c8d9a760a7823e8708bfb02443f 100644 (file)
@@ -205,11 +205,11 @@ exports["lang:en-ca"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Today at 2:00 AM",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Today at 2:25 AM",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Today at 3:00 AM",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Tomorrow at 2:00 AM",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Today at 1:00 AM",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Yesterday at 2:00 AM", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Today at 2:25 AM",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Today at 3:00 AM",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Tomorrow at 2:00 AM",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Today at 1:00 AM",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Yesterday at 2:00 AM", "yesterday at the same time");
         test.done();
     },
 
@@ -218,7 +218,7 @@ exports["lang:en-ca"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [at] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [at] LT'),  "Today + " + i + " days beginning of day");
@@ -233,7 +233,7 @@ exports["lang:en-ca"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[Last] dddd [at] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[Last] dddd [at] LT'),  "Today - " + i + " days beginning of day");
@@ -245,14 +245,14 @@ exports["lang:en-ca"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 4b9a2b53b08674fa90ab845d378e051e9a42a070..0fc81337ce5bfbbd8340014fedf141645e3c5f27 100644 (file)
@@ -180,11 +180,11 @@ exports["lang:en-gb"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Today at 02:00",      "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Today at 02:25",      "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Today at 03:00",      "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Tomorrow at 02:00",   "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Today at 01:00",      "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Yesterday at 02:00",  "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Today at 02:25",      "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Today at 03:00",      "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Tomorrow at 02:00",   "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Today at 01:00",      "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Yesterday at 02:00",  "yesterday at the same time");
         test.done();
     },
 
@@ -192,7 +192,7 @@ exports["lang:en-gb"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [at] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [at] LT'),  "Today + " + i + " days beginning of day");
@@ -207,7 +207,7 @@ exports["lang:en-gb"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[Last] dddd [at] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[Last] dddd [at] LT'),  "Today - " + i + " days beginning of day");
@@ -219,14 +219,14 @@ exports["lang:en-gb"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 8be2301d7cc34864a736cf01e619402bab9c61c5..68700d69b2aba91429eb3ed7cde667d5934ad8af 100644 (file)
@@ -205,11 +205,11 @@ exports["lang:en"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Today at 2:00 AM",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Today at 2:25 AM",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Today at 3:00 AM",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Tomorrow at 2:00 AM",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Today at 1:00 AM",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Yesterday at 2:00 AM", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Today at 2:25 AM",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Today at 3:00 AM",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Tomorrow at 2:00 AM",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Today at 1:00 AM",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Yesterday at 2:00 AM", "yesterday at the same time");
 
         test.done();
     },
@@ -219,7 +219,7 @@ exports["lang:en"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [at] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [at] LT'),  "Today + " + i + " days beginning of day");
@@ -234,7 +234,7 @@ exports["lang:en"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[Last] dddd [at] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[Last] dddd [at] LT'),  "Today - " + i + " days beginning of day");
@@ -246,14 +246,14 @@ exports["lang:en"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
@@ -347,7 +347,6 @@ exports["lang:en"] = {
     },
 
     "weeks year starting sunday format" : function (test) {
-
         test.equal(moment([2012, 0,  1]).format('w ww wo'), '1 01 1st', "Jan  1 2012 should be week 1");
         test.equal(moment([2012, 0,  7]).format('w ww wo'), '1 01 1st', "Jan  7 2012 should be week 1");
         test.equal(moment([2012, 0,  8]).format('w ww wo'), '2 02 2nd', "Jan  8 2012 should be week 2");
index b5d43014d49573c912ad4e4cc264a304683d74ae..5099c29c9c460ca175356574d2dd970aca5e413d 100644 (file)
@@ -186,11 +186,11 @@ exports["lang:eo"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Hodiaŭ je 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Hodiaŭ je 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Hodiaŭ je 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Morgaŭ je 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Hodiaŭ je 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Hieraŭ je 02:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Hodiaŭ je 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Hodiaŭ je 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Morgaŭ je 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Hodiaŭ je 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Hieraŭ je 02:00", "yesterday at the same time");
         test.done();
     },
 
@@ -199,7 +199,7 @@ exports["lang:eo"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [je] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [je] LT'),  "Today + " + i + " days beginning of day");
@@ -214,7 +214,7 @@ exports["lang:eo"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[pasinta] dddd [je] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[pasinta] dddd [je] LT'),  "Today - " + i + " days beginning of day");
@@ -226,14 +226,14 @@ exports["lang:eo"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 955ec62cb88dc0a36ffad4b09d3f8fbee9713cf6..6eb9592a4e1d9edc69571c6d29981e8d48c02bd6 100644 (file)
@@ -181,12 +181,12 @@ exports["lang:es"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                         "hoy a las 2:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),          "hoy a las 2:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),           "hoy a las 3:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),           "mañana a las 2:00",  "tomorrow at the same time");
-        test.equal(moment(a).add({ d: 1, h : -1 }).calendar(),   "mañana a la 1:00",   "tomorrow minus 1 hour");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),      "hoy a la 1:00",      "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),      "ayer a las 2:00",    "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),          "hoy a las 2:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),           "hoy a las 3:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),           "mañana a las 2:00",  "tomorrow at the same time");
+        test.equal(moment(a).add({d: 1, h : -1}).calendar(),   "mañana a la 1:00",   "tomorrow minus 1 hour");
+        test.equal(moment(a).subtract({h: 1}).calendar(),      "hoy a la 1:00",      "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),      "ayer a las 2:00",    "yesterday at the same time");
         test.done();
     },
 
@@ -195,7 +195,7 @@ exports["lang:es"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'),  "Today + " + i + " days beginning of day");
@@ -210,7 +210,7 @@ exports["lang:es"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[el] dddd [pasado a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[el] dddd [pasado a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'),  "Today - " + i + " days beginning of day");
@@ -222,14 +222,14 @@ exports["lang:es"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index caf417474f9f135458d385482c29131ae71a6433..33dfd0cc6a28e65b442c66433b8aed7dd14909ab 100644 (file)
@@ -213,11 +213,11 @@ exports["lang:et"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Täna, 2:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Täna, 2:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Täna, 3:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Homme, 2:00",    "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Täna, 1:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Eile, 2:00",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Täna, 2:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Täna, 3:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Homme, 2:00",    "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Täna, 1:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Eile, 2:00",     "yesterday at the same time");
         test.done();
     },
 
@@ -225,7 +225,7 @@ exports["lang:et"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('[Järgmine] dddd LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[Järgmine] dddd LT'),  "Today + " + i + " days beginning of day");
@@ -239,7 +239,7 @@ exports["lang:et"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[Eelmine] dddd LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[Eelmine] dddd LT'),  "Today - " + i + " days beginning of day");
@@ -251,14 +251,14 @@ exports["lang:et"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 nädal tagasi");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "1 nädala pärast");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 nädalat tagasi");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "2 nädala pärast");
index 9ad6dad259045f86d3f1ec53c0b83380531e1a88..72e91feeab35be193ff967de0f524e71ba3baac0 100644 (file)
@@ -186,11 +186,11 @@ exports["lang:eu"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "gaur 02:00etan",  "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "gaur 02:25etan",  "now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "gaur 03:00etan",  "now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "bihar 02:00etan", "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "gaur 01:00etan",  "now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "atzo 02:00etan",  "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "gaur 02:25etan",  "now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "gaur 03:00etan",  "now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "bihar 02:00etan", "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "gaur 01:00etan",  "now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "atzo 02:00etan",  "yesterday at the same time");
         test.done();
     },
 
@@ -198,7 +198,7 @@ exports["lang:eu"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd LT[etan]'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd LT[etan]'),  "Today + " + i + " days beginning of day");
@@ -212,7 +212,7 @@ exports["lang:eu"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[aurreko] dddd LT[etan]'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[aurreko] dddd LT[etan]'),  "Today - " + i + " days beginning of day");
@@ -224,14 +224,14 @@ exports["lang:eu"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index cf96fb4724a98fd2b64f86ac82cbe6766274de09..e6e496dc40c20d1af4479c6abcc0ca3e42f14f1a 100644 (file)
@@ -170,11 +170,11 @@ exports["lang:fa"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "امروز ساعت ۰۲:۰۰", "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "امروز ساعت ۰۲:۲۵", "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "امروز ساعت ۰۳:۰۰", "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "فردا ساعت ۰۲:۰۰", "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "امروز ساعت ۰۱:۰۰", "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "دیروز ساعت ۰۲:۰۰", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "امروز ساعت ۰۲:۲۵", "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "امروز ساعت ۰۳:۰۰", "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "فردا ساعت ۰۲:۰۰", "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "امروز ساعت ۰۱:۰۰", "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "دیروز ساعت ۰۲:۰۰", "yesterday at the same time");
         test.done();
     },
 
@@ -182,7 +182,7 @@ exports["lang:fa"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [ساعت] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [ساعت] LT'),  "Today + " + i + " days beginning of day");
@@ -196,7 +196,7 @@ exports["lang:fa"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [پیش ساعت] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [پیش ساعت] LT'),  "Today - " + i + " days beginning of day");
@@ -207,14 +207,14 @@ exports["lang:fa"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 1fe57af361ce19a39d2ae820e1950a4e31bd9f17..54cee162626a5f83eb611e1507fdc439bc63df02 100644 (file)
@@ -180,11 +180,11 @@ exports["lang:fi"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "tänään klo 02.00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "tänään klo 02.25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "tänään klo 03.00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "huomenna klo 02.00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "tänään klo 01.00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "eilen klo 02.00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "tänään klo 02.25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "tänään klo 03.00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "huomenna klo 02.00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "tänään klo 01.00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "eilen klo 02.00", "yesterday at the same time");
         test.done();
     },
 
@@ -193,7 +193,7 @@ exports["lang:fi"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [klo] LT'),  "today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [klo] LT'),  "today + " + i + " days beginning of day");
@@ -207,7 +207,7 @@ exports["lang:fi"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[viime] dddd[na] [klo] LT'),  "today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[viime] dddd[na] [klo] LT'),  "today - " + i + " days beginning of day");
@@ -219,14 +219,14 @@ exports["lang:fi"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "yksi viikko sitten");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "yhden viikon päästä");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "kaksi viikkoa sitten");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "kaden viikon päästä");
index f7b4fa780165f7880dde4b22c0423d0ea29a33b2..a0b5fcbd3aa74ad6736c8561a68a15893506db2d 100644 (file)
@@ -199,11 +199,11 @@ exports["lang:fr-ca"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Aujourd'hui à 02:00",    "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Aujourd'hui à 02:25",    "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Aujourd'hui à 03:00",    "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Demain à 02:00",         "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Aujourd'hui à 01:00",    "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Hier à 02:00",           "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Aujourd'hui à 02:25",    "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Aujourd'hui à 03:00",    "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Demain à 02:00",         "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Aujourd'hui à 01:00",    "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Hier à 02:00",           "yesterday at the same time");
         test.done();
     },
 
@@ -212,7 +212,7 @@ exports["lang:fr-ca"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [à] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [à] LT'),  "Today + " + i + " days beginning of day");
@@ -227,7 +227,7 @@ exports["lang:fr-ca"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [dernier à] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [dernier à] LT'),  "Today - " + i + " days beginning of day");
@@ -239,14 +239,14 @@ exports["lang:fr-ca"] = {
 
     "same all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 754d0bc631286a44cc96dbe09cce451e30127778..8f10ffb79c891cf395850b1a80d6b9976601e7c2 100644 (file)
@@ -184,11 +184,11 @@ exports["lang:fr"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Aujourd'hui à 02:00",    "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Aujourd'hui à 02:25",    "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Aujourd'hui à 03:00",    "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Demain à 02:00",         "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Aujourd'hui à 01:00",    "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Hier à 02:00",           "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Aujourd'hui à 02:25",    "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Aujourd'hui à 03:00",    "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Demain à 02:00",         "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Aujourd'hui à 01:00",    "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Hier à 02:00",           "yesterday at the same time");
         test.done();
     },
 
@@ -197,7 +197,7 @@ exports["lang:fr"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [à] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [à] LT'),  "Today + " + i + " days beginning of day");
@@ -212,7 +212,7 @@ exports["lang:fr"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [dernier à] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [dernier à] LT'),  "Today - " + i + " days beginning of day");
@@ -223,14 +223,14 @@ exports["lang:fr"] = {
     },
 
     "same all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 1df38913fa3b7a5a6cd002a918d53606adb852e5..08e42da2414123782800bfea235b1c89bb171a5f 100644 (file)
@@ -155,12 +155,12 @@ exports["lang:gl"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                         "hoxe ás 2:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),          "hoxe ás 2:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),           "hoxe ás 3:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),           "mañá ás 2:00",  "tomorrow at the same time");
-        test.equal(moment(a).add({ d: 1, h : -1 }).calendar(),   "mañá á 1:00",   "tomorrow minus 1 hour");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),      "hoxe á 1:00",      "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),      "onte á 2:00",    "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),          "hoxe ás 2:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),           "hoxe ás 3:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),           "mañá ás 2:00",  "tomorrow at the same time");
+        test.equal(moment(a).add({d: 1, h : -1}).calendar(),   "mañá á 1:00",   "tomorrow minus 1 hour");
+        test.equal(moment(a).subtract({h: 1}).calendar(),      "hoxe á 1:00",      "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),      "onte á 2:00",    "yesterday at the same time");
         test.done();
     },
 
@@ -169,7 +169,7 @@ exports["lang:gl"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'),  "Today + " + i + " days beginning of day");
@@ -183,7 +183,7 @@ exports["lang:gl"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'),  "Today - " + i + " days beginning of day");
@@ -195,14 +195,14 @@ exports["lang:gl"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
@@ -211,7 +211,7 @@ exports["lang:gl"] = {
 
     "regression tests" : function (test) {
 
-        var lastWeek = moment().subtract({ d: 4 }).hours(1);
+        var lastWeek = moment().subtract({d: 4}).hours(1);
         test.equal(lastWeek.calendar(), lastWeek.format('[o] dddd [pasado a] LT'), "1 o'clock bug");
 
         test.done();
index 16e1ac6b179452428d0d0572312ace803fe05487..288d2683fa31f44ebc1865a857a7e401d89c91e0 100644 (file)
@@ -144,11 +144,11 @@ exports["lang:he"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "היום ב־02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "היום ב־02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "היום ב־03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "מחר ב־02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "היום ב־01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "אתמול ב־02:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "היום ב־02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "היום ב־03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "מחר ב־02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "היום ב־01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "אתמול ב־02:00", "yesterday at the same time");
         test.done();
     },
 
@@ -156,7 +156,7 @@ exports["lang:he"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [בשעה] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [בשעה] LT'),  "Today + " + i + " days beginning of day");
@@ -170,7 +170,7 @@ exports["lang:he"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[ביום] dddd [האחרון בשעה] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[ביום] dddd [האחרון בשעה] LT'),  "Today - " + i + " days beginning of day");
@@ -182,14 +182,14 @@ exports["lang:he"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index f075a438560eb5aaa17e26fd2e98ab40646ac66c..456207ad5714d827a8bc0d2ef8e920ded8d6898e 100644 (file)
@@ -185,11 +185,11 @@ exports["lang:hi"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "आज रात २:०० बजे",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "आज रात २:२५ बजे",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 3 }).calendar(),       "आज सुबह ५:०० बजे",     "Now plus 3 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "कल रात २:०० बजे",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "आज रात १:०० बजे",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "कल रात २:०० बजे", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "आज रात २:२५ बजे",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 3}).calendar(),       "आज सुबह ५:०० बजे",     "Now plus 3 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "कल रात २:०० बजे",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "आज रात १:०० बजे",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "कल रात २:०० बजे", "yesterday at the same time");
         test.done();
     },
 
@@ -197,7 +197,7 @@ exports["lang:hi"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd[,] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd[,] LT'),  "Today + " + i + " days beginning of day");
@@ -212,7 +212,7 @@ exports["lang:hi"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[पिछले] dddd[,] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[पिछले] dddd[,] LT'),  "Today - " + i + " days beginning of day");
@@ -223,14 +223,14 @@ exports["lang:hi"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index e004912e596a97957ccd58512d90ca09764670e0..4eb294ef4f3e6dbbdfc8c9b9c5dc79f4d9deb4ed 100644 (file)
@@ -181,11 +181,11 @@ exports["lang:hr"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "danas u 2:00",  "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "danas u 2:25",  "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "danas u 3:00",  "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "sutra u 2:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "danas u 1:00",  "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "jučer u 2:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "danas u 2:25",  "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "danas u 3:00",  "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "sutra u 2:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "danas u 1:00",  "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "jučer u 2:00", "yesterday at the same time");
         test.done();
     },
 
@@ -210,7 +210,7 @@ exports["lang:hr"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days beginning of day");
@@ -240,7 +240,7 @@ exports["lang:hr"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days beginning of day");
@@ -252,14 +252,14 @@ exports["lang:hr"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index ce6b0f85c5ab81d52840ff43565a30551a62a135..62748c044400d5753343469f0d31f3dfea70197e 100644 (file)
@@ -198,11 +198,11 @@ exports["lang:hu"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "ma 2:00-kor",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "ma 2:25-kor",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "ma 3:00-kor",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "holnap 2:00-kor", "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "ma 1:00-kor",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "tegnap 2:00-kor", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "ma 2:25-kor",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "ma 3:00-kor",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "holnap 2:00-kor", "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "ma 1:00-kor",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "tegnap 2:00-kor", "yesterday at the same time");
         test.done();
     },
 
@@ -210,7 +210,7 @@ exports["lang:hu"] = {
 
         var i, m, days = 'vasárnap_hétfőn_kedden_szerdán_csütörtökön_pénteken_szombaton'.split('_');
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('[' + days[m.day()] + '] LT[-kor]'),  "today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[' + days[m.day()] + '] LT[-kor]'),  "today + " + i + " days beginning of day");
@@ -226,7 +226,7 @@ exports["lang:hu"] = {
         var i, m, days = 'vasárnap_hétfőn_kedden_szerdán_csütörtökön_pénteken_szombaton'.split('_');
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[múlt ' + days[m.day()] + '] LT[-kor]'),  "today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[múlt ' + days[m.day()] + '] LT[-kor]'),  "today - " + i + " days beginning of day");
@@ -239,14 +239,14 @@ exports["lang:hu"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "egy héte");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "egy hét múlva");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 hete");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "2 hét múlva");
index 2921503cd82d7373ce5d7275c29b40db309b7024..b516241b2522f7e7efa3ec2efde108318111e37f 100644 (file)
@@ -257,11 +257,11 @@ exports["lang:hy-am"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "այսօր 02:00",   "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "այսօր 02:25",   "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "այսօր 03:00",   "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "վաղը 02:00",   "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "այսօր 01:00",   "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "երեկ 02:00",   "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "այսօր 02:25",   "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "այսօր 03:00",   "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "վաղը 02:00",   "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "այսօր 01:00",   "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "երեկ 02:00",   "yesterday at the same time");
         test.done();
     },
 
@@ -273,7 +273,7 @@ exports["lang:hy-am"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days beginning of day");
@@ -292,7 +292,7 @@ exports["lang:hy-am"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days beginning of day");
@@ -304,14 +304,14 @@ exports["lang:hy-am"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index b1c8d329c5514e7d4e02f0da13588d06d6c8d6fd..86b5c59e0991a9628bf2851f2424df0ca5309275 100644 (file)
@@ -142,11 +142,11 @@ exports["lang:id"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Hari ini pukul 02.00", "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Hari ini pukul 02.25", "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Hari ini pukul 03.00", "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Besok pukul 02.00",    "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Hari ini pukul 01.00", "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Kemarin pukul 02.00",  "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Hari ini pukul 02.25", "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Hari ini pukul 03.00", "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Besok pukul 02.00",    "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Hari ini pukul 01.00", "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Kemarin pukul 02.00",  "yesterday at the same time");
         test.done();
     },
 
@@ -154,7 +154,7 @@ exports["lang:id"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [pukul] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [pukul] LT'),  "Today + " + i + " days beginning of day");
@@ -168,7 +168,7 @@ exports["lang:id"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [lalu pukul] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [lalu pukul] LT'),  "Today - " + i + " days beginning of day");
@@ -180,14 +180,14 @@ exports["lang:id"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index a2f6854fe6fe1b7093de7c24655b28692eac6323..bd20b3731428d4af605df5137d3fb453a92463c6 100644 (file)
@@ -192,11 +192,11 @@ exports["lang:is"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "í dag kl. 2:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "í dag kl. 2:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "í dag kl. 3:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "á morgun kl. 2:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "í dag kl. 1:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "í gær kl. 2:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "í dag kl. 2:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "í dag kl. 3:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "á morgun kl. 2:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "í dag kl. 1:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "í gær kl. 2:00", "yesterday at the same time");
         test.done();
     },
 
@@ -204,7 +204,7 @@ exports["lang:is"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [kl.] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [kl.] LT'),  "Today + " + i + " days beginning of day");
@@ -219,7 +219,7 @@ exports["lang:is"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[síðasta] dddd [kl.] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[síðasta] dddd [kl.] LT'),  "Today - " + i + " days beginning of day");
@@ -231,14 +231,14 @@ exports["lang:is"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 471acfd228a545b03f008287b793beff1f65ce9a..eafae2338bbe8e48e6900677e8e8d82178339a3d 100644 (file)
@@ -183,11 +183,11 @@ exports["lang:it"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Oggi alle 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Oggi alle 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Oggi alle 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Domani alle 02:00",   "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Oggi alle 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Ieri alle 02:00",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Oggi alle 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Oggi alle 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Domani alle 02:00",   "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Oggi alle 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Ieri alle 02:00",     "yesterday at the same time");
         test.done();
     },
 
@@ -195,7 +195,7 @@ exports["lang:it"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [alle] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [alle] LT'),  "Today + " + i + " days beginning of day");
@@ -209,7 +209,7 @@ exports["lang:it"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[lo scorso] dddd [alle] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[lo scorso] dddd [alle] LT'),  "Today - " + i + " days beginning of day");
@@ -221,14 +221,14 @@ exports["lang:it"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 49139b587b9e7bccbf34ec3fa99f2f4a3d2247dd..6b71da6e5d967be150dc88788a6f4db0eed1c91e 100644 (file)
@@ -147,11 +147,11 @@ exports["lang:ja"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "今日 午前2時0分",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "今日 午前2時25分",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "今日 午前3時0分",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "明日 午前2時0分",     "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "今日 午前1時0分",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "昨日 午前2時0分",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "今日 午前2時25分",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "今日 午前3時0分",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "明日 午前2時0分",     "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "今日 午前1時0分",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "昨日 午前2時0分",     "yesterday at the same time");
         test.done();
     },
 
@@ -159,7 +159,7 @@ exports["lang:ja"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('[来週]dddd LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[来週]dddd LT'),  "Today + " + i + " days beginning of day");
@@ -173,7 +173,7 @@ exports["lang:ja"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[前週]dddd LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[前週]dddd LT'),  "Today - " + i + " days beginning of day");
@@ -185,14 +185,14 @@ exports["lang:ja"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),      "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),      "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 5ba855381c9a83fb341f62d1fa4eac18b158e6ad..5136c7bdc17c2042010b37434e444d6837f34662 100644 (file)
@@ -208,11 +208,11 @@ exports["lang:ka"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "დღეს 2:00 AM-ზე",  "დღეს ამავე დროს");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "დღეს 2:25 AM-ზე",  "ახლანდელ დროს დამატებული 25 წუთი");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "დღეს 3:00 AM-ზე",  "ახლანდელ დროს დამატებული 1 საათი");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "ხვალ 2:00 AM-ზე",  "ხვალ ამავე დროს");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "დღეს 1:00 AM-ზე",  "ახლანდელ დროს გამოკლებული 1 საათი");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "გუშინ 2:00 AM-ზე", "გუშინ ამავე დროს");
+        test.equal(moment(a).add({m: 25}).calendar(),      "დღეს 2:25 AM-ზე",  "ახლანდელ დროს დამატებული 25 წუთი");
+        test.equal(moment(a).add({h: 1}).calendar(),       "დღეს 3:00 AM-ზე",  "ახლანდელ დროს დამატებული 1 საათი");
+        test.equal(moment(a).add({d: 1}).calendar(),       "ხვალ 2:00 AM-ზე",  "ხვალ ამავე დროს");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "დღეს 1:00 AM-ზე",  "ახლანდელ დროს გამოკლებული 1 საათი");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "გუშინ 2:00 AM-ზე", "გუშინ ამავე დროს");
 
         test.done();
     },
@@ -221,7 +221,7 @@ exports["lang:ka"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('[შემდეგ] dddd LT[-ზე]'),  "დღეს + " + i + " დღე ახლანდელ დროს");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[შემდეგ] dddd LT[-ზე]'),  "დღეს + " + i + " დღე დღის დასაწყისში");
@@ -235,7 +235,7 @@ exports["lang:ka"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[წინა] dddd LT[-ზე]'),  "დღეს - " + i + " დღე ახლანდელ დროს");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[წინა] dddd LT[-ზე]'),  "დღეს - " + i + " დღე დღის დასაწყისში");
@@ -247,14 +247,14 @@ exports["lang:ka"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 კვირის წინ");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "1 კვირაში");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 კვირის წინ");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "2 კვირაში");
index 3b09774d2adbd54eb1f987d34d3a4bc8ccd7c3b5..0c37e3ba779610721dbe093abb9d77d68d9d380f 100644 (file)
@@ -39,29 +39,29 @@ exports["lang:km"] = {
 
     "format": function (test) {
         var a = [
-            ['dddd, MMMM Do YYYY, h:mm:ss a', 'អាទិត្យ, កុម្ភៈ 14 2010, 3:25:50 pm'],
-            ['ddd, hA', 'អាទិត្យ, 3PM'],
-            ['M Mo MM MMMM MMM', '2 2 02 កុម្ភៈ កុម្ភៈ'],
-            ['YYYY YY', '2010 10'],
-            ['D Do DD', '14 14 14'],
-            ['d do dddd ddd dd', '0 0 អាទិត្យ អាទិត្យ អាទិត្យ'],
-            ['DDD DDDo DDDD', '45 45 045'],
-            ['w wo ww', '6 6 06'],
-            ['h hh', '3 03'],
-            ['H HH', '15 15'],
-            ['m mm', '25 25'],
-            ['s ss', '50 50'],
-            ['a A', 'pm PM'],
-            ['[the] DDDo [day of the year]', 'the 45 day of the year'],
-            ['L', '14/02/2010'],
-            ['LL', '14 កុម្ភៈ 2010'],
-            ['LLL', '14 កុម្ភៈ 2010 15:25'],
-            ['LLLL', 'អាទិត្យ, 14 កុម្ភៈ 2010 15:25'],
-            ['l', '14/2/2010'],
-            ['ll', '14 កុម្ភៈ 2010'],
-            ['lll', '14 កុម្ភៈ 2010 15:25'],
-            ['llll', 'អាទិត្យ, 14 កុម្ភៈ 2010 15:25']
-        ],
+                ['dddd, MMMM Do YYYY, h:mm:ss a', 'អាទិត្យ, កុម្ភៈ 14 2010, 3:25:50 pm'],
+                ['ddd, hA', 'អាទិត្យ, 3PM'],
+                ['M Mo MM MMMM MMM', '2 2 02 កុម្ភៈ កុម្ភៈ'],
+                ['YYYY YY', '2010 10'],
+                ['D Do DD', '14 14 14'],
+                ['d do dddd ddd dd', '0 0 អាទិត្យ អាទិត្យ អាទិត្យ'],
+                ['DDD DDDo DDDD', '45 45 045'],
+                ['w wo ww', '6 6 06'],
+                ['h hh', '3 03'],
+                ['H HH', '15 15'],
+                ['m mm', '25 25'],
+                ['s ss', '50 50'],
+                ['a A', 'pm PM'],
+                ['[the] DDDo [day of the year]', 'the 45 day of the year'],
+                ['L', '14/02/2010'],
+                ['LL', '14 កុម្ភៈ 2010'],
+                ['LLL', '14 កុម្ភៈ 2010 15:25'],
+                ['LLLL', 'អាទិត្យ, 14 កុម្ភៈ 2010 15:25'],
+                ['l', '14/2/2010'],
+                ['ll', '14 កុម្ភៈ 2010'],
+                ['lll', '14 កុម្ភៈ 2010 15:25'],
+                ['llll', 'អាទិត្យ, 14 កុម្ភៈ 2010 15:25']
+            ],
             b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
             i;
         for (i = 0; i < a.length; i++) {
@@ -128,34 +128,34 @@ exports["lang:km"] = {
 
     "from": function (test) {
         var start = moment([2007, 1, 28]);
-        test.equal(start.from(moment([2007, 1, 28]).add({ s: 44 }), true), "ប៉ុន្មានវិនាទី", "44 seconds = ប៉ុន្មានវិនាទី");
-        test.equal(start.from(moment([2007, 1, 28]).add({ s: 45 }), true), "មួយនាទី", "45 seconds = មួយនាទី");
-        test.equal(start.from(moment([2007, 1, 28]).add({ s: 89 }), true), "មួយនាទី", "89 seconds = មួយនាទី");
-        test.equal(start.from(moment([2007, 1, 28]).add({ s: 90 }), true), "2 នាទី", "90 seconds = 2 នាទី");
-        test.equal(start.from(moment([2007, 1, 28]).add({ m: 44 }), true), "44 នាទី", "44 minutes = 44 នាទី");
-        test.equal(start.from(moment([2007, 1, 28]).add({ m: 45 }), true), "មួយម៉ោង", "45 minutes = មួយម៉ោង");
-        test.equal(start.from(moment([2007, 1, 28]).add({ m: 89 }), true), "មួយម៉ោង", "89 minutes = មួយម៉ោង");
-        test.equal(start.from(moment([2007, 1, 28]).add({ m: 90 }), true), "2 ម៉ោង", "90 minutes = 2 ម៉ោង");
-        test.equal(start.from(moment([2007, 1, 28]).add({ h: 5 }), true), "5 ម៉ោង", "5 hours = 5 ម៉ោង");
-        test.equal(start.from(moment([2007, 1, 28]).add({ h: 21 }), true), "21 ម៉ោង", "21 hours = 21 ម៉ោង");
-        test.equal(start.from(moment([2007, 1, 28]).add({ h: 22 }), true), "មួយថ្ងៃ", "22 hours = មួយថ្ងៃ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ h: 35 }), true), "មួយថ្ងៃ", "35 hours = មួយថ្ងៃ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ h: 36 }), true), "2 ថ្ងៃ", "36 hours = 2 ថ្ងៃ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 1 }), true), "មួយថ្ងៃ", "1 day = មួយថ្ងៃ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 5 }), true), "5 ថ្ងៃ", "5 days = 5 ថ្ងៃ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 25 }), true), "25 ថ្ងៃ", "25 days = 25 ថ្ងៃ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 26 }), true), "មួយខែ", "26 days = មួយខែ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 30 }), true), "មួយខែ", "30 days = មួយខែ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 43 }), true), "មួយខែ", "43 days = មួយខែ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 46 }), true), "2 ខែ", "46 days = 2 ខែ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 74 }), true), "2 ខែ", "75 days = 2 ខែ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 76 }), true), "3 ខែ", "76 days = 3 ខែ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ M: 1 }), true), "មួយខែ", "1 month = មួយខែ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ M: 5 }), true), "5 ខែ", "5 months = 5 ខែ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 345 }), true), "មួយឆ្នាំ", "345 days = មួយឆ្នាំ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 548 }), true), "2 ឆ្នាំ", "548 days = 2 ឆ្នាំ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ y: 1 }), true), "មួយឆ្នាំ", "1 year = មួយឆ្នាំ");
-        test.equal(start.from(moment([2007, 1, 28]).add({ y: 5 }), true), "5 ឆ្នាំ", "5 years = 5 ឆ្នាំ");
+        test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "ប៉ុន្មានវិនាទី", "44 seconds = ប៉ុន្មានវិនាទី");
+        test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "មួយនាទី", "45 seconds = មួយនាទី");
+        test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "មួយនាទី", "89 seconds = មួយនាទី");
+        test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 នាទី", "90 seconds = 2 នាទី");
+        test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 នាទី", "44 minutes = 44 នាទី");
+        test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "មួយម៉ោង", "45 minutes = មួយម៉ោង");
+        test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "មួយម៉ោង", "89 minutes = មួយម៉ោង");
+        test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 ម៉ោង", "90 minutes = 2 ម៉ោង");
+        test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 ម៉ោង", "5 hours = 5 ម៉ោង");
+        test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 ម៉ោង", "21 hours = 21 ម៉ោង");
+        test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "មួយថ្ងៃ", "22 hours = មួយថ្ងៃ");
+        test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "មួយថ្ងៃ", "35 hours = មួយថ្ងៃ");
+        test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 ថ្ងៃ", "36 hours = 2 ថ្ងៃ");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "មួយថ្ងៃ", "1 day = មួយថ្ងៃ");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 ថ្ងៃ", "5 days = 5 ថ្ងៃ");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 ថ្ងៃ", "25 days = 25 ថ្ងៃ");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "មួយខែ", "26 days = មួយខែ");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "មួយខែ", "30 days = មួយខែ");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 43}), true), "មួយខែ", "43 days = មួយខែ");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 ខែ", "46 days = 2 ខែ");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 ខែ", "75 days = 2 ខែ");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 ខែ", "76 days = 3 ខែ");
+        test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "មួយខែ", "1 month = មួយខែ");
+        test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 ខែ", "5 months = 5 ខែ");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "មួយឆ្នាំ", "345 days = មួយឆ្នាំ");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 ឆ្នាំ", "548 days = 2 ឆ្នាំ");
+        test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "មួយឆ្នាំ", "1 year = មួយឆ្នាំ");
+        test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 ឆ្នាំ", "5 years = 5 ឆ្នាំ");
         test.done();
     },
 
@@ -239,8 +239,8 @@ exports["lang:km"] = {
     "calendar all else": function (test) {
 
         var weeksAgo = moment().subtract({
-            w: 1
-        }),
+                w: 1
+            }),
             weeksFromNow = moment().add({
                 w: 1
             });
index 07bc491fd72bb7eccf44271551319f24c6a14259..138c7a21e57359f63323de72a9f3e8a8c541c06c 100644 (file)
@@ -231,11 +231,11 @@ exports["lang:ko"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "오늘 오전 2시 00분",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "오늘 오전 2시 25분",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "오늘 오전 3시 00분",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "내일 오전 2시 00분",     "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "오늘 오전 1시 00분",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "어제 오전 2시 00분",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "오늘 오전 2시 25분",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "오늘 오전 3시 00분",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "내일 오전 2시 00분",     "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "오늘 오전 1시 00분",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "어제 오전 2시 00분",     "yesterday at the same time");
         test.done();
     },
 
@@ -243,7 +243,7 @@ exports["lang:ko"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd LT'),  "Today + " + i + " days beginning of day");
@@ -257,7 +257,7 @@ exports["lang:ko"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('지난주 dddd LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('지난주 dddd LT'),  "Today - " + i + " days beginning of day");
@@ -269,14 +269,14 @@ exports["lang:ko"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 9d9c03a6016d101cdde751b52044d36df3afd111..b693e158154932cd47ba7c05250717ebda3298a6 100644 (file)
@@ -152,7 +152,7 @@ exports["lang:lb"] = {
 
         var i, m, weekday, datestring;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
 
             // Different date string for "Dënschdeg" (Tuesday) and "Donneschdeg" (Thursday)
             weekday = parseInt(m.format('d'), 10);
index 210940771bba877a7902c9c76f8e6ba3a0c32ee2..2b03b3a1f4029d21183432e9b831dd6623bfbf1d 100644 (file)
@@ -204,11 +204,11 @@ exports["lang:lt"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Šiandien 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Šiandien 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Šiandien 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Rytoj 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Šiandien 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Vakar 02:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Šiandien 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Šiandien 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Rytoj 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Šiandien 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Vakar 02:00", "yesterday at the same time");
         test.done();
     },
 
@@ -216,7 +216,7 @@ exports["lang:lt"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd LT'),  "Today + " + i + " days beginning of day");
@@ -230,7 +230,7 @@ exports["lang:lt"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[Praėjusį] dddd LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[Praėjusį] dddd LT'),  "Today - " + i + " days beginning of day");
@@ -241,14 +241,14 @@ exports["lang:lt"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 7cd812f9da5aa7c30d12f680d38015325dc79883..fc70b8cc782287076cfa27d42b24e8860d515660 100644 (file)
@@ -186,11 +186,11 @@ exports["lang:lv"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Šodien pulksten 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Šodien pulksten 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Šodien pulksten 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Rīt pulksten 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Šodien pulksten 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Vakar pulksten 02:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Šodien pulksten 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Šodien pulksten 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Rīt pulksten 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Šodien pulksten 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Vakar pulksten 02:00", "yesterday at the same time");
         test.done();
     },
 
@@ -198,7 +198,7 @@ exports["lang:lv"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [pulksten] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [pulksten] LT'),  "Today + " + i + " days beginning of day");
@@ -212,7 +212,7 @@ exports["lang:lv"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[Pagājušā] dddd [pulksten] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[Pagājušā] dddd [pulksten] LT'),  "Today - " + i + " days beginning of day");
@@ -223,14 +223,14 @@ exports["lang:lv"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 07469886a8804e9a16624010676464997a672125..d756d54341a9e10e368b422a7bd9a78be13d24a1 100644 (file)
@@ -180,11 +180,11 @@ exports["lang:mk"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Денес во 2:00",  "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Денес во 2:25",  "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Денес во 3:00",  "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Утре во 2:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Денес во 1:00",  "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Вчера во 2:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Денес во 2:25",  "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Денес во 3:00",  "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Утре во 2:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Денес во 1:00",  "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Вчера во 2:00", "yesterday at the same time");
         test.done();
     },
 
@@ -192,7 +192,7 @@ exports["lang:mk"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [во] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [во] LT'),  "Today + " + i + " days beginning of day");
@@ -221,7 +221,7 @@ exports["lang:mk"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days beginning of day");
@@ -232,14 +232,14 @@ exports["lang:mk"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index b3ce061c5e87e7bf991e7f8bc2da4e6e2f18cc36..b07f308ecaafcdba87135875490e493134491947 100644 (file)
@@ -185,11 +185,11 @@ exports["lang:ml"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "ഇന്ന് രാത്രി 2:00 -നു",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "ഇന്ന് രാത്രി 2:25 -നു",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 3 }).calendar(),       "ഇന്ന് രാവിലെ 5:00 -നു",     "Now plus 3 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "നാളെ രാത്രി 2:00 -നു",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "ഇന്ന് രാത്രി 1:00 -നു",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "ഇന്നലെ രാത്രി 2:00 -നു", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "ഇന്ന് രാത്രി 2:25 -നു",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 3}).calendar(),       "ഇന്ന് രാവിലെ 5:00 -നു",     "Now plus 3 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "നാളെ രാത്രി 2:00 -നു",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "ഇന്ന് രാത്രി 1:00 -നു",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "ഇന്നലെ രാത്രി 2:00 -നു", "yesterday at the same time");
         test.done();
     },
 
@@ -197,7 +197,7 @@ exports["lang:ml"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd[,] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd[,] LT'),  "Today + " + i + " days beginning of day");
@@ -212,7 +212,7 @@ exports["lang:ml"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[കഴിഞ്ഞ] dddd[,] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[കഴിഞ്ഞ] dddd[,] LT'),  "Today - " + i + " days beginning of day");
@@ -223,14 +223,14 @@ exports["lang:ml"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index b2d5e538a74944ba60bec567421259d24f4f7767..db6d094c65a54c2301f3828ddf6c1b8773bafbd9 100644 (file)
@@ -136,7 +136,7 @@ exports["lang:mr"] = {
         test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true),  "एक मिनिट",      "45 seconds = a minute");
         test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true),  "एक मिनिट",      "89 seconds = a minute");
         test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true),  "२ मिनिटे",     "90 seconds = 2 minutes");
-        test.equal(start.from(moment([2007, 1, 28]).add({ m: 44 }), true), "४४ मिनिटे", "44 minutes = 44 minutes");
+        test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "४४ मिनिटे", "44 minutes = 44 minutes");
         test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true),  "एक तास",       "45 minutes = an hour");
         test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true),  "एक तास",       "89 minutes = an hour");
         test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true),  "२ तास",       "90 minutes = 2 hours");
@@ -148,18 +148,18 @@ exports["lang:mr"] = {
         test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true),   "एक दिवस",         "1 day = a day");
         test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true),   "५ दिवस",        "5 days = 5 days");
         test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true),  "२५ दिवस",       "25 days = 25 days");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 26 }), true), "एक महिना", "26 days = a month");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 30 }), true), "एक महिना", "30 days = a month");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 43 }), true), "एक महिना", "43 days = a month");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 46 }), true), "२ महिने", "46 days = 2 months");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 74 }), true), "२ महिने", "75 days = 2 months");
-        test.equal(start.from(moment([2007, 1, 28]).add({ d: 76 }), true), "३ महिने", "76 days = 3 months");
-        test.equal(start.from(moment([2007, 1, 28]).add({ M: 1 }), true), "एक महिना", "1 month = a month");
-        test.equal(start.from(moment([2007, 1, 28]).add({ M: 5 }), true), "५ महिने", "5 months = 5 months");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "एक महिना", "26 days = a month");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "एक महिना", "30 days = a month");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 43}), true), "एक महिना", "43 days = a month");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "२ महिने", "46 days = 2 months");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "२ महिने", "75 days = 2 months");
+        test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "३ महिने", "76 days = 3 months");
+        test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "एक महिना", "1 month = a month");
+        test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "५ महिने", "5 months = 5 months");
         test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "एक वर्ष",        "345 days = a year");
         test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "२ वर्षे",       "548 days = 2 years");
         test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true),   "एक वर्ष",        "1 year = a year");
-        test.equal(start.from(moment([2007, 1, 28]).add({ y: 5 }), true), "५ वर्षे", "5 years = 5 years");
+        test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "५ वर्षे", "5 years = 5 years");
         test.done();
     },
 
@@ -175,8 +175,8 @@ exports["lang:mr"] = {
     },
 
     "fromNow" : function (test) {
-        test.equal(moment().add({ s: 30 }).fromNow(), "सेकंद नंतर", "सेकंद नंतर");
-        test.equal(moment().add({ d: 5 }).fromNow(), "५ दिवस नंतर", "५ दिवस नंतर");
+        test.equal(moment().add({s: 30}).fromNow(), "सेकंद नंतर", "सेकंद नंतर");
+        test.equal(moment().add({d: 5}).fromNow(), "५ दिवस नंतर", "५ दिवस नंतर");
         test.done();
     },
 
@@ -185,11 +185,11 @@ exports["lang:mr"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "आज रात्री २:०० वाजता",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "आज रात्री २:२५ वाजता",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 3 }).calendar(),       "आज सकाळी ५:०० वाजता",     "Now plus 3 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "उद्या रात्री २:०० वाजता",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "आज रात्री १:०० वाजता",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "काल रात्री २:०० वाजता", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "आज रात्री २:२५ वाजता",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 3}).calendar(),       "आज सकाळी ५:०० वाजता",     "Now plus 3 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "उद्या रात्री २:०० वाजता",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "आज रात्री १:०० वाजता",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "काल रात्री २:०० वाजता", "yesterday at the same time");
         test.done();
     },
 
@@ -197,7 +197,7 @@ exports["lang:mr"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd[,] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd[,] LT'),  "Today + " + i + " days beginning of day");
@@ -212,7 +212,7 @@ exports["lang:mr"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(), m.format('[मागील] dddd[,] LT'), "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(), m.format('[मागील] dddd[,] LT'), "Today - " + i + " days beginning of day");
@@ -223,14 +223,14 @@ exports["lang:mr"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 1224c98ffb23c2a95a4289d783997a636da127c7..3101d796f7320da462277704abd76872ce99f3ed 100644 (file)
@@ -205,11 +205,11 @@ exports["lang:ms-my"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Hari ini pukul 02.00",     "hari ini pada waktu yang sama");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Hari ini pukul 02.25",     "Sekarang tambah 25 minit");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Hari ini pukul 03.00",     "Sekarang tambah 1 jam");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Esok pukul 02.00",  "esok pada waktu yang sama");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Hari ini pukul 01.00",     "Sekarang tolak 1 jam");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Kelmarin pukul 02.00", "kelmarin pada waktu yang sama");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Hari ini pukul 02.25",     "Sekarang tambah 25 minit");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Hari ini pukul 03.00",     "Sekarang tambah 1 jam");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Esok pukul 02.00",  "esok pada waktu yang sama");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Hari ini pukul 01.00",     "Sekarang tolak 1 jam");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Kelmarin pukul 02.00", "kelmarin pada waktu yang sama");
 
         test.done();
     },
@@ -218,7 +218,7 @@ exports["lang:ms-my"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [pukul] LT'),  "Hari ini + " + i + " hari waktu sekarang");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [pukul] LT'),  "Hari ini + " + i + " hari permulaan hari");
@@ -232,7 +232,7 @@ exports["lang:ms-my"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [lepas] [pukul] LT'),  "Hari ini - " + i + " hari waktu sekarang");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [lepas] [pukul] LT'),  "Hari ini - " + i + " hari permulaan hari");
@@ -244,14 +244,14 @@ exports["lang:ms-my"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 minggu lepas");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "dalam 1 minggu");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 minggu lepas");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "dalam 2 minggu");
index feb554c5e601b8c11af79a11672414698a9e0115..29837b74b28df1c2d82fab4de2be080f6b1fc4be 100644 (file)
@@ -187,11 +187,11 @@ exports["lang:nb"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "i dag kl. 2.00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "i dag kl. 2.25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "i dag kl. 3.00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "i morgen kl. 2.00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "i dag kl. 1.00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "i går kl. 2.00",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "i dag kl. 2.25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "i dag kl. 3.00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "i morgen kl. 2.00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "i dag kl. 1.00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "i går kl. 2.00",     "yesterday at the same time");
         test.done();
     },
 
@@ -199,7 +199,7 @@ exports["lang:nb"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [kl.] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [kl.] LT'),  "Today + " + i + " days beginning of day");
@@ -213,7 +213,7 @@ exports["lang:nb"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[forrige] dddd [kl.] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[forrige] dddd [kl.] LT'),  "Today - " + i + " days beginning of day");
@@ -224,14 +224,14 @@ exports["lang:nb"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index e8b1d0aee9240f9a838e9d410c7806cf1d1eef09..baec130b87ba57535c2322081c40979308d12995 100644 (file)
@@ -185,11 +185,11 @@ exports["lang:ne"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "आज रातीको २:०० बजे",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "आज रातीको २:२५ बजे",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "आज बिहानको ३:०० बजे",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "भोली रातीको २:०० बजे",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "आज रातीको १:०० बजे",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "हिजो रातीको २:०० बजे", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "आज रातीको २:२५ बजे",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "आज बिहानको ३:०० बजे",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "भोली रातीको २:०० बजे",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "आज रातीको १:०० बजे",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "हिजो रातीको २:०० बजे", "yesterday at the same time");
         test.done();
     },
 
@@ -197,7 +197,7 @@ exports["lang:ne"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('[आउँदो] dddd[,] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[आउँदो] dddd[,] LT'),  "Today + " + i + " days beginning of day");
@@ -211,7 +211,7 @@ exports["lang:ne"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[गएको] dddd[,] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[गएको] dddd[,] LT'),  "Today - " + i + " days beginning of day");
@@ -222,14 +222,14 @@ exports["lang:ne"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index bd8ca55db6b2b6d26e26e8dfaa58f5b179e8f256..7abdfc98a88269cb34e7d5ba8bd29b54992c396e 100644 (file)
@@ -186,11 +186,11 @@ exports["lang:nl"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "vandaag om 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "vandaag om 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "vandaag om 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "morgen om 02:00",    "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "vandaag om 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "gisteren om 02:00",   "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "vandaag om 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "vandaag om 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "morgen om 02:00",    "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "vandaag om 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "gisteren om 02:00",   "yesterday at the same time");
         test.done();
     },
 
@@ -198,7 +198,7 @@ exports["lang:nl"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [om] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [om] LT'),  "Today + " + i + " days beginning of day");
@@ -212,7 +212,7 @@ exports["lang:nl"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[afgelopen] dddd [om] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[afgelopen] dddd [om] LT'),  "Today - " + i + " days beginning of day");
@@ -224,14 +224,14 @@ exports["lang:nl"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index a8cdd34564247f19f1b2c81faa3439970f70b8ac..28481449466a26a3db86369b9965b876060ff973 100644 (file)
@@ -186,11 +186,11 @@ exports["lang:nn"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "I dag klokka 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "I dag klokka 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "I dag klokka 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "I morgon klokka 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "I dag klokka 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "I går klokka 02:00",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "I dag klokka 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "I dag klokka 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "I morgon klokka 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "I dag klokka 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "I går klokka 02:00",     "yesterday at the same time");
         test.done();
     },
 
@@ -198,7 +198,7 @@ exports["lang:nn"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [klokka] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [klokka] LT'),  "Today + " + i + " days beginning of day");
@@ -212,7 +212,7 @@ exports["lang:nn"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[Føregåande] dddd [klokka] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[Føregåande] dddd [klokka] LT'),  "Today - " + i + " days beginning of day");
@@ -223,14 +223,14 @@ exports["lang:nn"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index cc36c1a2fe3c64decf743e2c5520be21bc8e498d..15f7f87b5d91b0580391db61fc61afa33077f757 100644 (file)
@@ -191,11 +191,11 @@ exports["lang:pl"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Dziś o 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Dziś o 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Dziś o 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Jutro o 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Dziś o 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Wczoraj o 02:00",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Dziś o 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Dziś o 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Jutro o 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Dziś o 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Wczoraj o 02:00",     "yesterday at the same time");
         test.done();
     },
 
@@ -203,7 +203,7 @@ exports["lang:pl"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('[W] dddd [o] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[W] dddd [o] LT'),  "Today + " + i + " days beginning of day");
@@ -231,7 +231,7 @@ exports["lang:pl"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(), m.format(makeFormat(m)), "Today - " + i + " days current time");
 
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
@@ -245,14 +245,14 @@ exports["lang:pl"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index d672988bb784be394d2acc32966c6b1d958741d9..fa0762eea862fa4f62dc79b4896f70000535d769 100644 (file)
@@ -187,11 +187,11 @@ exports["lang:pt-br"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Hoje às 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Hoje às 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Hoje às 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Amanhã às 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Hoje às 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Ontem às 02:00",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Hoje às 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Hoje às 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Amanhã às 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Hoje às 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Ontem às 02:00",     "yesterday at the same time");
         test.done();
     },
 
@@ -199,7 +199,7 @@ exports["lang:pt-br"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [às] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [às] LT'),  "Today + " + i + " days beginning of day");
@@ -213,7 +213,7 @@ exports["lang:pt-br"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format((m.day() === 0 || m.day() === 6) ? '[Último] dddd [às] LT' : '[Última] dddd [às] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format((m.day() === 0 || m.day() === 6) ? '[Último] dddd [às] LT' : '[Última] dddd [às] LT'),  "Today - " + i + " days beginning of day");
@@ -225,14 +225,14 @@ exports["lang:pt-br"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 261811f2da6159a0f9b2181c7d213bfa7060204f..1d3dc7fa5dcf670f34b65d158fb55795db80adc4 100644 (file)
@@ -177,11 +177,11 @@ exports["lang:pt"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Hoje às 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Hoje às 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Hoje às 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Amanhã às 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Hoje às 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Ontem às 02:00",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Hoje às 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Hoje às 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Amanhã às 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Hoje às 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Ontem às 02:00",     "yesterday at the same time");
         test.done();
     },
 
@@ -189,7 +189,7 @@ exports["lang:pt"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [às] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [às] LT'),  "Today + " + i + " days beginning of day");
@@ -203,7 +203,7 @@ exports["lang:pt"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format((m.day() === 0 || m.day() === 6) ? '[Último] dddd [às] LT' : '[Última] dddd [às] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format((m.day() === 0 || m.day() === 6) ? '[Último] dddd [às] LT' : '[Última] dddd [às] LT'),  "Today - " + i + " days beginning of day");
@@ -215,14 +215,14 @@ exports["lang:pt"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 4a42d6ccce28006612080cedc0f724ef8261b1b0..f1fd228f434017e056500944c8dbc9764fe36adf 100644 (file)
@@ -194,11 +194,11 @@ exports["lang:ro"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "azi la 2:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "azi la 2:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "azi la 3:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "mâine la 2:00",   "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "azi la 1:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "ieri la 2:00",    "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "azi la 2:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "azi la 3:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "mâine la 2:00",   "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "azi la 1:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "ieri la 2:00",    "yesterday at the same time");
         test.done();
     },
 
@@ -206,7 +206,7 @@ exports["lang:ro"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [la] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [la] LT'),  "Today + " + i + " days beginning of day");
@@ -220,7 +220,7 @@ exports["lang:ro"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[fosta] dddd [la] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[fosta] dddd [la] LT'),  "Today - " + i + " days beginning of day");
@@ -231,14 +231,14 @@ exports["lang:ro"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 743d16c23d0d59dd7b2b8cb980cc0b4191d24e9e..d427bf17d170bf7ad372484cc51a82d49fc01cc4 100644 (file)
@@ -260,11 +260,11 @@ exports["lang:ru"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Сегодня в 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Сегодня в 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Сегодня в 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Завтра в 02:00",      "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Сегодня в 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Вчера в 02:00",       "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Сегодня в 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Сегодня в 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Завтра в 02:00",      "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Сегодня в 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Вчера в 02:00",       "yesterday at the same time");
         test.done();
     },
 
@@ -276,7 +276,7 @@ exports["lang:ru"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days beginning of day");
@@ -306,7 +306,7 @@ exports["lang:ru"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days beginning of day");
@@ -318,14 +318,14 @@ exports["lang:ru"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index a49315ebe0b86ab33b8f34ea3d39caa0d03e6d05..1e022c52963606727b18a5734aed4f5fec9e7ed1 100644 (file)
@@ -214,11 +214,11 @@ exports["lang:sk"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "dnes o 2:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "dnes o 2:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "dnes o 3:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "zajtra o 2:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "dnes o 1:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "včera o 2:00",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "dnes o 2:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "dnes o 3:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "zajtra o 2:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "dnes o 1:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "včera o 2:00",     "yesterday at the same time");
         test.done();
     },
 
@@ -226,7 +226,7 @@ exports["lang:sk"] = {
 
         var i, m, nextDay;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             nextDay = '';
             switch (m.day()) {
             case 0:
@@ -264,7 +264,7 @@ exports["lang:sk"] = {
 
         var i, m, lastDay;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             lastDay = '';
             switch (m.day()) {
             case 0:
@@ -299,14 +299,14 @@ exports["lang:sk"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index d0dd8a611c08df3d12f9410d727ddc78edba88f1..92fd1f1a1a48920a5583c8616ef7fba05c69c6a2 100644 (file)
@@ -181,11 +181,11 @@ exports["lang:sl"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "danes ob 2:00",  "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "danes ob 2:25",  "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "danes ob 3:00",  "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "jutri ob 2:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "danes ob 1:00",  "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "včeraj ob 2:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "danes ob 2:25",  "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "danes ob 3:00",  "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "jutri ob 2:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "danes ob 1:00",  "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "včeraj ob 2:00", "yesterday at the same time");
         test.done();
     },
 
@@ -210,7 +210,7 @@ exports["lang:sl"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days beginning of day");
@@ -239,7 +239,7 @@ exports["lang:sl"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days beginning of day");
@@ -251,14 +251,14 @@ exports["lang:sl"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index f29dfb4a602228a89816ec934549d0f12e90465b..6f17032e84740ed6afebd1f64fa099252d8c9e7b 100644 (file)
@@ -213,11 +213,11 @@ exports["lang:sq"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Sot në 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Sot në 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Sot në 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Nesër në 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Sot në 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Dje në 02:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Sot në 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Sot në 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Nesër në 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Sot në 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Dje në 02:00", "yesterday at the same time");
 
         test.done();
     },
@@ -227,7 +227,7 @@ exports["lang:sq"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [në] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [në] LT'),  "Today + " + i + " days beginning of day");
@@ -242,7 +242,7 @@ exports["lang:sq"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [e kaluar në] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [e kaluar në] LT'),  "Today - " + i + " days beginning of day");
@@ -254,14 +254,14 @@ exports["lang:sq"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 35acccdfe4ca83842596496ab8422308330ef878..55c30e7c28b2e909a78a369f98d0a588d923ef3f 100644 (file)
@@ -184,11 +184,11 @@ exports["lang:sr-cyrl"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "данас у 2:00",  "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "данас у 2:25",  "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "данас у 3:00",  "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "сутра у 2:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "данас у 1:00",  "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "јуче у 2:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "данас у 2:25",  "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "данас у 3:00",  "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "сутра у 2:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "данас у 1:00",  "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "јуче у 2:00", "yesterday at the same time");
         test.done();
     },
 
@@ -213,7 +213,7 @@ exports["lang:sr-cyrl"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days beginning of day");
@@ -242,7 +242,7 @@ exports["lang:sr-cyrl"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days beginning of day");
@@ -254,14 +254,14 @@ exports["lang:sr-cyrl"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 79591d04ef2a2bdfe2a87da849a4a846e95914c3..a0c77f2f7a978c609ee348cceca5da371373d58c 100644 (file)
@@ -184,11 +184,11 @@ exports["lang:sr"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "danas u 2:00",  "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "danas u 2:25",  "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "danas u 3:00",  "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "sutra u 2:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "danas u 1:00",  "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "juče u 2:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "danas u 2:25",  "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "danas u 3:00",  "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "sutra u 2:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "danas u 1:00",  "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "juče u 2:00", "yesterday at the same time");
         test.done();
     },
 
@@ -213,7 +213,7 @@ exports["lang:sr"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today + " + i + " days beginning of day");
@@ -242,7 +242,7 @@ exports["lang:sr"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days beginning of day");
@@ -254,14 +254,14 @@ exports["lang:sr"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 51edfd5678b2c5a5904b64b1415b027d5114cdf1..dc3c77d138635c0861787b1a1ef7e6757dba4fdd 100644 (file)
@@ -179,11 +179,11 @@ exports["lang:sv"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Idag 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Idag 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Idag 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Imorgon 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Idag 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Igår 02:00",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Idag 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Idag 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Imorgon 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Idag 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Igår 02:00",     "yesterday at the same time");
         test.done();
     },
 
@@ -191,7 +191,7 @@ exports["lang:sv"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd LT'),  "Today + " + i + " days beginning of day");
@@ -205,7 +205,7 @@ exports["lang:sv"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[Förra] dddd[en] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[Förra] dddd[en] LT'),  "Today - " + i + " days beginning of day");
@@ -216,14 +216,14 @@ exports["lang:sv"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index d9ca4eea20d242ac37c0fdc28249048c3213b50b..6c5a469c0757b11e7bbb80f5512c9fec178609fc 100644 (file)
@@ -180,11 +180,11 @@ exports["lang:ta"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),  "இன்று 02:00", "இன்று  02:00");
-        test.equal(moment(a).add({ m: 25 }).calendar(), "இன்று 02:25", "இன்று  02:25");
-        test.equal(moment(a).add({ h: 1 }).calendar(), "இன்று 03:00", "இன்று  03:00");
-        test.equal(moment(a).add({ d: 1 }).calendar(), "நாளை 02:00", "நாளை  02:00");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "இன்று 01:00",      "இன்று  01:00");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "நேற்று 02:00",  "நேற்று  02:00");
+        test.equal(moment(a).add({m: 25}).calendar(), "இன்று 02:25", "இன்று  02:25");
+        test.equal(moment(a).add({h: 1}).calendar(), "இன்று 03:00", "இன்று  03:00");
+        test.equal(moment(a).add({d: 1}).calendar(), "நாளை 02:00", "நாளை  02:00");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "இன்று 01:00",      "இன்று  01:00");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "நேற்று 02:00",  "நேற்று  02:00");
         test.done();
     },
 
@@ -192,7 +192,7 @@ exports["lang:ta"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd, LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd, LT'),  "Today + " + i + " days beginning of day");
@@ -207,7 +207,7 @@ exports["lang:ta"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[கடந்த வாரம்] dddd, LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[கடந்த வாரம்] dddd, LT'),  "Today - " + i + " days beginning of day");
@@ -220,14 +220,14 @@ exports["lang:ta"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 13da803f2b3df2141234290f7558c5d681eb7c89..9a5c884ff70750189d40b996f638863de8640c7b 100644 (file)
@@ -147,11 +147,11 @@ exports["lang:th"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "วันนี้ เวลา 2 นาฬิกา 0 นาที",      "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "วันนี้ เวลา 2 นาฬิกา 25 นาที",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "วันนี้ เวลา 3 นาฬิกา 0 นาที",      "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "พรุ่งนี้ เวลา 2 นาฬิกา 0 นาที", "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "วันนี้ เวลา 1 นาฬิกา 0 นาที",      "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "เมื่อวานนี้ เวลา 2 นาฬิกา 0 นาที", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "วันนี้ เวลา 2 นาฬิกา 25 นาที",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "วันนี้ เวลา 3 นาฬิกา 0 นาที",      "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "พรุ่งนี้ เวลา 2 นาฬิกา 0 นาที", "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "วันนี้ เวลา 1 นาฬิกา 0 นาที",      "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "เมื่อวานนี้ เวลา 2 นาฬิกา 0 นาที", "yesterday at the same time");
         test.done();
     },
 
@@ -159,7 +159,7 @@ exports["lang:th"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd[หน้า เวลา] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd[หน้า เวลา] LT'),  "Today + " + i + " days beginning of day");
@@ -173,7 +173,7 @@ exports["lang:th"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[วัน]dddd[ที่แล้ว เวลา] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[วัน]dddd[ที่แล้ว เวลา] LT'),  "Today - " + i + " days beginning of day");
@@ -185,14 +185,14 @@ exports["lang:th"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),      "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),      "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 7da00486f0a2d28929cf8c212be2d9e850d98a75..0f2a4c31bcea463a8693950512b7cf18a17ceb6b 100644 (file)
@@ -184,11 +184,11 @@ exports["lang:tl-ph"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Ngayon sa 02:00",    "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Ngayon sa 02:25",    "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Ngayon sa 03:00",    "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Bukas sa 02:00",     "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Ngayon sa 01:00",    "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Kahapon sa 02:00",   "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Ngayon sa 02:25",    "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Ngayon sa 03:00",    "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Bukas sa 02:00",     "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Ngayon sa 01:00",    "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Kahapon sa 02:00",   "yesterday at the same time");
         test.done();
     },
 
@@ -197,7 +197,7 @@ exports["lang:tl-ph"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [sa] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [sa] LT'),  "Today + " + i + " days beginning of day");
@@ -212,7 +212,7 @@ exports["lang:tl-ph"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [huling linggo] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [huling linggo] LT'),  "Today - " + i + " days beginning of day");
@@ -223,14 +223,14 @@ exports["lang:tl-ph"] = {
     },
 
     "same all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 388edbf37286b096774a2a4cf73dc3a377bea756..5e2f14ea35265f64456a679cf9c9e32ec12cfb37 100644 (file)
@@ -196,11 +196,11 @@ exports["lang:tr"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "bugün saat 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "bugün saat 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "bugün saat 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "yarın saat 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "bugün saat 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "dün 02:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "bugün saat 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "bugün saat 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "yarın saat 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "bugün saat 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "dün 02:00", "yesterday at the same time");
         test.done();
     },
 
@@ -208,7 +208,7 @@ exports["lang:tr"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('[haftaya] dddd [saat] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[haftaya] dddd [saat] LT'),  "Today + " + i + " days beginning of day");
@@ -222,7 +222,7 @@ exports["lang:tr"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[geçen hafta] dddd [saat] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[geçen hafta] dddd [saat] LT'),  "Today - " + i + " days beginning of day");
@@ -234,14 +234,14 @@ exports["lang:tr"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index efedb58ab512372073eacdbdf2e2298eac59e5db..9b249f7aacf1089d28d91e93c94655b193e47754 100644 (file)
@@ -187,11 +187,11 @@ exports["lang:tzm-latn"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "asdkh g 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "asdkh g 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "asdkh g 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "aska g 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "asdkh g 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "assant g 02:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "asdkh g 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "asdkh g 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "aska g 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "asdkh g 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "assant g 02:00", "yesterday at the same time");
         test.done();
     },
 
@@ -199,7 +199,7 @@ exports["lang:tzm-latn"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [g] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [g] LT'),  "Today + " + i + " days beginning of day");
@@ -213,7 +213,7 @@ exports["lang:tzm-latn"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [g] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [g] LT'),  "Today - " + i + " days beginning of day");
@@ -224,14 +224,14 @@ exports["lang:tzm-latn"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 566592b77198f2ac4dadc66921bf42a6ce0453f2..25f9e7d4084c14f0174c8caece90eab5dbef30e6 100644 (file)
@@ -178,11 +178,11 @@ exports["lang:tzm"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "ⴰⵙⴷⵅ ⴴ 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "ⴰⵙⴷⵅ ⴴ 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "ⴰⵙⴷⵅ ⴴ 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "ⴰⵙⴽⴰ ⴴ 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "ⴰⵙⴷⵅ ⴴ 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "ⴰⵚⴰⵏⵜ ⴴ 02:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "ⴰⵙⴷⵅ ⴴ 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "ⴰⵙⴷⵅ ⴴ 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "ⴰⵙⴽⴰ ⴴ 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "ⴰⵙⴷⵅ ⴴ 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "ⴰⵚⴰⵏⵜ ⴴ 02:00", "yesterday at the same time");
         test.done();
     },
 
@@ -190,7 +190,7 @@ exports["lang:tzm"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [ⴴ] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [ⴴ] LT'),  "Today + " + i + " days beginning of day");
@@ -204,7 +204,7 @@ exports["lang:tzm"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [ⴴ] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [ⴴ] LT'),  "Today - " + i + " days beginning of day");
@@ -215,14 +215,14 @@ exports["lang:tzm"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 7cfe4ec7ade56148e52642674d3ec1d33c85c9a5..8ec46ef0703b23d7a27853a525c1633456a0b740 100644 (file)
@@ -199,13 +199,13 @@ exports["lang:uk"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Сьогодні о 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Сьогодні о 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Сьогодні о 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Завтра о 02:00",      "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Сьогодні о 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Вчора о 02:00",       "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Сьогодні о 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Сьогодні о 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Завтра о 02:00",      "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Сьогодні о 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Вчора о 02:00",       "yesterday at the same time");
         // A special case for Ukrainian since 11 hours have different preposition
-        test.equal(moment(a).add({ h: 9 }).calendar(),  "Сьогодні об 11:00",       "same day at 11 o'clock");
+        test.equal(moment(a).add({h: 9}).calendar(),  "Сьогодні об 11:00",       "same day at 11 o'clock");
         test.done();
     },
 
@@ -213,7 +213,7 @@ exports["lang:uk"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('[У] dddd [о' + (m.hours() === 11 ? 'б' : '') + '] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[У] dddd [о] LT'),  "Today + " + i + " days beginning of day");
@@ -242,7 +242,7 @@ exports["lang:uk"] = {
         }
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format(makeFormat(m)),  "Today - " + i + " days beginning of day");
@@ -253,14 +253,14 @@ exports["lang:uk"] = {
     },
 
     "calendar all else" : function (test) {
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 27dfd1d91a656a407289abe489e35e22a011bdd1..12f36f4e546aada00f11fec739955693f2e25a5d 100644 (file)
@@ -181,11 +181,11 @@ exports["lang:uz"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Бугун соат 02:00 да",      "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Бугун соат 02:25 да",      "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Бугун соат 03:00 да",      "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Эртага 02:00 да",   "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Бугун соат 01:00 да",      "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Кеча соат 02:00 да",  "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Бугун соат 02:25 да",      "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Бугун соат 03:00 да",      "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Эртага 02:00 да",   "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Бугун соат 01:00 да",      "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Кеча соат 02:00 да",  "yesterday at the same time");
         test.done();
     },
 
@@ -193,7 +193,7 @@ exports["lang:uz"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [куни соат] LT [да]'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [куни соат] LT [да]'),  "Today + " + i + " days beginning of day");
@@ -208,7 +208,7 @@ exports["lang:uz"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[Утган] dddd [куни соат] LT [да]'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[Утган] dddd [куни соат] LT [да]'),  "Today - " + i + " days beginning of day");
@@ -220,14 +220,14 @@ exports["lang:uz"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index 4a969986c811a5eeff0f2d67a206a234e9bd1c5f..71bfac6f102f2b12c4ff82e30353277d13982751 100644 (file)
@@ -205,11 +205,11 @@ exports["lang:vi"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Hôm nay lúc 02:00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Hôm nay lúc 02:25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Hôm nay lúc 03:00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Ngày mai lúc 02:00",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Hôm nay lúc 01:00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Hôm qua lúc 02:00", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Hôm nay lúc 02:25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Hôm nay lúc 03:00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Ngày mai lúc 02:00",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Hôm nay lúc 01:00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Hôm qua lúc 02:00", "yesterday at the same time");
 
         test.done();
     },
@@ -219,7 +219,7 @@ exports["lang:vi"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('dddd [tuần tới lúc] LT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [tuần tới lúc] LT'),  "Today + " + i + " days beginning of day");
@@ -234,7 +234,7 @@ exports["lang:vi"] = {
         var i, m;
 
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('dddd [tuần rồi lúc] LT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('dddd [tuần rồi lúc] LT'),  "Today - " + i + " days beginning of day");
@@ -246,14 +246,14 @@ exports["lang:vi"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index c48e1e0029150f6fbb725cd5bee06119730072a8..94b0b5cfc156e1e83d63360a0afbaa429d41658b 100644 (file)
@@ -162,11 +162,11 @@ exports["lang:zh-cn"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "今天凌晨2点整",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "今天凌晨2点25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "今天凌晨3点整",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "明天凌晨2点整",     "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "今天凌晨1点整",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "昨天凌晨2点整",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "今天凌晨2点25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "今天凌晨3点整",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "明天凌晨2点整",     "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "今天凌晨1点整",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "昨天凌晨2点整",     "yesterday at the same time");
         test.done();
     },
 
@@ -175,7 +175,7 @@ exports["lang:zh-cn"] = {
             today = moment().startOf('day');
 
         for (i = 0; i < 7; i++) {
-            m = moment().startOf('week').add({ d: i});
+            m = moment().startOf('week').add({d: i});
             if (Math.abs(m.diff(today, 'days')) <= 1) {
                 continue; // skip today, yesterday, tomorrow
             }
@@ -189,7 +189,7 @@ exports["lang:zh-cn"] = {
             today = moment().startOf('day');
 
         for (i = 7; i < 14; i++) {
-            m = moment().startOf('week').add({ d: i});
+            m = moment().startOf('week').add({d: i});
             if (Math.abs(m.diff(today, 'days')) >= 7) {
                 continue;
             }
@@ -206,7 +206,7 @@ exports["lang:zh-cn"] = {
             today = moment().startOf('day');
 
         for (i = 1; i < 8; i++) {
-            m = moment().startOf('week').subtract({ d: i});
+            m = moment().startOf('week').subtract({d: i});
             if ((Math.abs(m.diff(today, 'days')) >= 7) || (Math.abs(m.diff(today, 'days')) <= 1)) {
                 continue;
             }
@@ -217,14 +217,14 @@ exports["lang:zh-cn"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('LL'),      "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('LL'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('LL'),      "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('LL'),  "in 2 weeks");
index cff82a8028aeb4c90f97d9779a4341b6943fcd63..8bd5ab78ca4396cd76b4da70d03f50d3366bc3d2 100644 (file)
@@ -160,11 +160,11 @@ exports["lang:zh-tw"] = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "今天早上2點00",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "今天早上2點25",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "今天早上3點00",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "明天早上2點00",     "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "今天早上1點00",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "昨天早上2點00",     "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "今天早上2點25",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "今天早上3點00",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "明天早上2點00",     "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "今天早上1點00",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "昨天早上2點00",     "yesterday at the same time");
 
         test.done();
     },
@@ -173,7 +173,7 @@ exports["lang:zh-tw"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().add({ d: i });
+            m = moment().add({d: i});
             test.equal(m.calendar(),       m.format('[下]ddddLT'),  "Today + " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[下]ddddLT'),  "Today + " + i + " days beginning of day");
@@ -188,7 +188,7 @@ exports["lang:zh-tw"] = {
 
         var i, m;
         for (i = 2; i < 7; i++) {
-            m = moment().subtract({ d: i });
+            m = moment().subtract({d: i});
             test.equal(m.calendar(),       m.format('[上]ddddLT'),  "Today - " + i + " days current time");
             m.hours(0).minutes(0).seconds(0).milliseconds(0);
             test.equal(m.calendar(),       m.format('[上]ddddLT'),  "Today - " + i + " days beginning of day");
@@ -201,14 +201,14 @@ exports["lang:zh-tw"] = {
 
     "calendar all else" : function (test) {
 
-        var weeksAgo = moment().subtract({ w: 1 }),
-            weeksFromNow = moment().add({ w: 1 });
+        var weeksAgo = moment().subtract({w: 1}),
+            weeksFromNow = moment().add({w: 1});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),      "1 week ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 1 week");
 
-        weeksAgo = moment().subtract({ w: 2 });
-        weeksFromNow = moment().add({ w: 2 });
+        weeksAgo = moment().subtract({w: 2});
+        weeksFromNow = moment().add({w: 2});
 
         test.equal(weeksAgo.calendar(),       weeksAgo.format('L'),      "2 weeks ago");
         test.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  "in 2 weeks");
index b8c4a9a5570832ba05c5194c062132e16f4094f1..854852157af2c5c1fff36f6278c53ab774aeae77 100644 (file)
@@ -1,16 +1,16 @@
-var moment = require("../../moment");
+var moment = require("../../moment"),
 
-var getVerifier = function (test) {
-    return function (input, format, expected, description, asymetrical) {
-        var m = moment(input, format);
-        test.equal(m.format('YYYY MM DD'), expected, 'compare: ' + description);
+    getVerifier = function (test) {
+        return function (input, format, expected, description, asymetrical) {
+            var m = moment(input, format);
+            test.equal(m.format('YYYY MM DD'), expected, 'compare: ' + description);
 
-        //test round trip
-        if (!asymetrical) {
-            test.equal(m.format(format), input, 'round trip: ' + description);
-        }
+            //test round trip
+            if (!asymetrical) {
+                test.equal(m.format(format), input, 'round trip: ' + description);
+            }
+        };
     };
-};
 
 exports.create = {
     setUp : function (done) {
@@ -402,7 +402,7 @@ exports.create = {
         test.equal(moment('1994', [moment.ISO_8601, 'MM', 'HH:mm', 'YYYY']).year(), 1994, 'iso: test parse YYYY');
         test.equal(moment('17:15', [moment.ISO_8601, 'MM', 'HH:mm', 'YYYY']).hour(), 17, 'iso: test parse HH:mm (1)');
         test.equal(moment('17:15', [moment.ISO_8601, 'MM', 'HH:mm', 'YYYY']).minutes(), 15, 'iso: test parse HH:mm (2)');
-        test.equal(moment('06', [moment.ISO_8601, 'MM', 'HH:mm', 'YYYY']).month(), 6-1, 'iso: test parse MM');
+        test.equal(moment('06', [moment.ISO_8601, 'MM', 'HH:mm', 'YYYY']).month(), 6 - 1, 'iso: test parse MM');
         test.equal(moment('2012-06-01', [moment.ISO_8601, 'MM', 'HH:mm', 'YYYY']).parsingFlags().iso, true, 'iso: test parse iso');
         test.equal(moment('2014-05-05', [moment.ISO_8601, 'YYYY-MM-DD']).parsingFlags().iso, true, 'iso: edge case array precedence iso');
         test.equal(moment('2014-05-05', ['YYYY-MM-DD', moment.ISO_8601]).parsingFlags().iso, false, 'iso: edge case array precedence not iso');
@@ -665,10 +665,10 @@ exports.create = {
     "parsing iso Z timezone" : function (test) {
         var i,
             formats = [
-            ['2011-10-08T18:04Z',             '2011-10-08T18:04:00.000+00:00'],
-            ['2011-10-08T18:04:20Z',          '2011-10-08T18:04:20.000+00:00'],
-            ['2011-10-08T18:04:20.111Z',      '2011-10-08T18:04:20.111+00:00']
-        ];
+                ['2011-10-08T18:04Z',             '2011-10-08T18:04:00.000+00:00'],
+                ['2011-10-08T18:04:20Z',          '2011-10-08T18:04:20.000+00:00'],
+                ['2011-10-08T18:04:20.111Z',      '2011-10-08T18:04:20.111+00:00']
+            ];
         test.expect(formats.length);
         for (i = 0; i < formats.length; i++) {
             test.equal(moment.utc(formats[i][0]).format('YYYY-MM-DDTHH:mm:ss.SSSZ'), formats[i][1], "moment should be able to parse ISO " + formats[i][0]);
@@ -722,7 +722,7 @@ exports.create = {
     "six digit years" : function (test) {
         test.expect(8);
         test.equal(moment([-270000, 0, 1]).format("YYYYY-MM-DD"), "-270000-01-01", "format BC 270,001");
-        test.equal(moment([ 270000, 0, 1]).format("YYYYY-MM-DD"), "270000-01-01", "format AD 270,000");
+        test.equal(moment([270000, 0, 1]).format("YYYYY-MM-DD"), "270000-01-01", "format AD 270,000");
         test.equal(moment("-270000-01-01", "YYYYY-MM-DD").toDate().getFullYear(), -270000, "parse BC 270,001");
         test.equal(moment("270000-01-01",  "YYYYY-MM-DD").toDate().getFullYear(), 270000, "parse AD 270,000");
         test.equal(moment("+270000-01-01", "YYYYY-MM-DD").toDate().getFullYear(), 270000, "parse AD +270,000");
index 095f9ca6eb36cf3b920f72d87368b2399881dec9..c84a8a8b5dfd97b02a68364c3722e7a88362fd25 100644 (file)
@@ -364,7 +364,11 @@ exports.format = {
     "toJSON skips postformat" : function (test) {
         test.expect(1);
 
-        moment.lang('postformat', {postformat: function (s) { s.replace(/./g, 'X'); }});
+        moment.lang('postformat', {
+            postformat: function (s) {
+                s.replace(/./g, 'X');
+            }
+        });
         test.equal(moment.utc([2000, 0, 1]).toJSON(), "2000-01-01T00:00:00.000Z", "toJSON doesn't postformat");
         moment.lang('postformat', null);
         test.done();
@@ -375,14 +379,14 @@ exports.format = {
 
         moment.lang('en');
         var zones = [60, -60, 90, -90, 360, -360, 720, -720],
-            b = moment().utc().startOf('day').subtract({ m : 1 }),
-            c = moment().local().startOf('day').subtract({ m : 1 }),
-            d = moment().local().startOf('day').subtract({ d : 2 }),
+            b = moment().utc().startOf('day').subtract({m : 1}),
+            c = moment().local().startOf('day').subtract({m : 1}),
+            d = moment().local().startOf('day').subtract({d : 2}),
             i, z, a;
 
         for (i = 0; i < zones.length; ++i) {
             z = zones[i];
-            a = moment().zone(z).startOf('day').subtract({ m: 1 });
+            a = moment().zone(z).startOf('day').subtract({m: 1});
             test.equal(moment(a).zone(z).calendar(), "Yesterday at 11:59 PM", "Yesterday at 11:59 PM, not Today, or the wrong time");
         }
 
index 59ac5c2daaa9cf41e92d2fb7f48edc598ffa29c8..1fd1d22b88bf5fac72657ca416c880dedb75bb1d 100644 (file)
@@ -156,7 +156,7 @@ exports.gettersSetters = {
     //     test.equals(a.weekday(), 1);
 
     //     test.done();
-    // },
+    //},
 
     // I think this suffers from the same issue as the non-iso version.
     // "setters programatic with weeks ISO" : function (test) {
@@ -170,7 +170,7 @@ exports.gettersSetters = {
     //     test.equals(a.day(), 4);
 
     //     test.done();
-    // },
+    //},
 
     "setters strings" : function (test) {
         test.expect(7);
index e2934c1ef1be92c6b810d72680ea4ab1ee891189..17c9fc45293ba9154417d21eff91151f8a9d6c35 100644 (file)
@@ -9,54 +9,28 @@ exports.mutable = {
     },
 
     "manipulation methods" : function (test) {
-
-        var mutableMethods = {
-            'year':          function (m) { return m.year(2011); },
-            'month':         function (m) { return m.month(1); },
-            'date':          function (m) { return m.date(9); },
-            'hours':         function (m) { return m.hours(7); },
-            'minutes':       function (m) { return m.minutes(33); },
-            'seconds':       function (m) { return m.seconds(44); },
-            'milliseconds':  function (m) { return m.milliseconds(55); },
-            'day':           function (m) { return m.day(2); },
-            'startOf':       function (m) { return m.startOf('week'); },
-            'endOf':         function (m) { return m.endOf('week'); },
-            'add':           function (m) { return m.add('days', 1); },
-            'subtract':      function (m) { return m.subtract('years', 2); },
-            'local':         function (m) { return m.local(); },
-            'utc':           function (m) { return m.utc(); }
-        }, method, d, d2;
-
-        test.expect(14);
-
-        for (method in mutableMethods) {
-            if (mutableMethods.hasOwnProperty(method)) {
-                d = moment();
-                d2 = mutableMethods[method](d);
-                test.equal(d, d2, method + "() should be mutable");
-            }
-        }
+        var m = moment();
+
+        test.equal(m, m.year(2011), 'year() should be mutable');
+        test.equal(m, m.month(1), 'month() should be mutable');
+        test.equal(m, m.hours(7), 'hours() should be mutable');
+        test.equal(m, m.minutes(33), 'minutes() should be mutable');
+        test.equal(m, m.seconds(44), 'seconds() should be mutable');
+        test.equal(m, m.milliseconds(55), 'milliseconds() should be mutable');
+        test.equal(m, m.day(2), 'day() should be mutable');
+        test.equal(m, m.startOf('week'), 'startOf() should be mutable');
+        test.equal(m, m.add(1, 'days'), 'add() should be mutable');
+        test.equal(m, m.subtract(2, 'years'), 'subtract() should be mutable');
+        test.equal(m, m.local(), 'local() should be mutable');
+        test.equal(m, m.utc(), 'utc() should be mutable');
 
         test.done();
     },
 
     "non mutable methods" : function (test) {
-
-        var nonMutableMethods = {
-            'clone':       function (m) { return m.clone(); }
-        }, method, d, d2;
-
-        test.expect(1);
-
-        for (method in nonMutableMethods) {
-            if (nonMutableMethods.hasOwnProperty(method)) {
-                d = new Date();
-                d2 = nonMutableMethods[method](moment(d)).toDate();
-                test.notEqual(d, d2, method + "() should not be mutable");
-            }
-        }
+        var m = moment();
+        test.notEqual(m, m.clone(), "clone() should not be mutable");
 
         test.done();
     }
-
 };
index 5e38f875826543c97032037a4f60ed0be0a5fc46..3dd0841f25967eff14acc90e9a3cad30d4414408 100644 (file)
@@ -1,45 +1,44 @@
-var moment = require("../../moment");
-
-
-var symbolMap = {
-    '1': '!',
-    '2': '@',
-    '3': '#',
-    '4': '$',
-    '5': '%',
-    '6': '^',
-    '7': '&',
-    '8': '*',
-    '9': '(',
-    '0': ')'
-};
-
-var numberMap = {
-    '!': '1',
-    '@': '2',
-    '#': '3',
-    '$': '4',
-    '%': '5',
-    '^': '6',
-    '&': '7',
-    '*': '8',
-    '(': '9',
-    ')': '0'
-};
+var moment = require("../../moment"),
+
+    symbolMap = {
+        '1': '!',
+        '2': '@',
+        '3': '#',
+        '4': '$',
+        '5': '%',
+        '6': '^',
+        '7': '&',
+        '8': '*',
+        '9': '(',
+        '0': ')'
+    },
 
-var symbolLang = {
-    preparse: function (string) {
-        return string.replace(/[!@#$%\^&*()]/g, function (match) {
-            return numberMap[match];
-        });
+    numberMap = {
+        '!': '1',
+        '@': '2',
+        '#': '3',
+        '$': '4',
+        '%': '5',
+        '^': '6',
+        '&': '7',
+        '*': '8',
+        '(': '9',
+        ')': '0'
     },
 
-    postformat: function (string) {
-        return string.replace(/\d/g, function (match) {
-            return symbolMap[match];
-        });
-    }
-};
+    symbolLang = {
+        preparse: function (string) {
+            return string.replace(/[!@#$%\^&*()]/g, function (match) {
+                return numberMap[match];
+            });
+        },
+
+        postformat: function (string) {
+            return string.replace(/\d/g, function (match) {
+                return symbolMap[match];
+            });
+        }
+    };
 
 exports.preparsePostformat = {
     setUp: function (cb) {
@@ -84,11 +83,11 @@ exports.preparsePostformat = {
         var a = moment().hours(2).minutes(0).seconds(0);
 
         test.equal(moment(a).calendar(),                     "Today at @:)) AM",     "today at the same time");
-        test.equal(moment(a).add({ m: 25 }).calendar(),      "Today at @:@% AM",     "Now plus 25 min");
-        test.equal(moment(a).add({ h: 1 }).calendar(),       "Today at #:)) AM",     "Now plus 1 hour");
-        test.equal(moment(a).add({ d: 1 }).calendar(),       "Tomorrow at @:)) AM",  "tomorrow at the same time");
-        test.equal(moment(a).subtract({ h: 1 }).calendar(),  "Today at !:)) AM",     "Now minus 1 hour");
-        test.equal(moment(a).subtract({ d: 1 }).calendar(),  "Yesterday at @:)) AM", "yesterday at the same time");
+        test.equal(moment(a).add({m: 25}).calendar(),      "Today at @:@% AM",     "Now plus 25 min");
+        test.equal(moment(a).add({h: 1}).calendar(),       "Today at #:)) AM",     "Now plus 1 hour");
+        test.equal(moment(a).add({d: 1}).calendar(),       "Tomorrow at @:)) AM",  "tomorrow at the same time");
+        test.equal(moment(a).subtract({h: 1}).calendar(),  "Today at !:)) AM",     "Now minus 1 hour");
+        test.equal(moment(a).subtract({d: 1}).calendar(),  "Yesterday at @:)) AM", "yesterday at the same time");
 
         test.done();
     }
index 3a8611fdbe693b40ba36f459c3b760411a735d5a..42c8d79e316a12ec9fa30bc7bddde32a2271476f 100644 (file)
@@ -13,7 +13,9 @@ exports.stringPrototype = {
 
         moment.lang('en');
         var prior = String.prototype.call, b;
-        String.prototype.call = function () { return null; };
+        String.prototype.call = function () {
+            return null;
+        };
 
         b = moment(new Date(2011, 7, 28, 15, 25, 50, 125));
         test.equal(b.format('MMMM Do YYYY, h:mm a'), 'August 28th 2011, 3:25 pm');