]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Fix locale-specific unit tests for DST
authorMatt Johnson <mj1856@hotmail.com>
Sun, 13 Mar 2016 02:39:33 +0000 (18:39 -0800)
committerIskren Chernev <iskren.chernev@gmail.com>
Thu, 24 Mar 2016 10:57:09 +0000 (03:57 -0700)
98 files changed:
src/test/locale/af.js
src/test/locale/ar-ma.js
src/test/locale/ar-sa.js
src/test/locale/ar-tn.js
src/test/locale/ar.js
src/test/locale/az.js
src/test/locale/be.js
src/test/locale/bg.js
src/test/locale/bn.js
src/test/locale/bo.js
src/test/locale/br.js
src/test/locale/bs.js
src/test/locale/ca.js
src/test/locale/cs.js
src/test/locale/cv.js
src/test/locale/cy.js
src/test/locale/da.js
src/test/locale/de-at.js
src/test/locale/de.js
src/test/locale/dv.js
src/test/locale/el.js
src/test/locale/en-au.js
src/test/locale/en-ca.js
src/test/locale/en-gb.js
src/test/locale/en-ie.js
src/test/locale/en-nz.js
src/test/locale/en.js
src/test/locale/eo.js
src/test/locale/es.js
src/test/locale/et.js
src/test/locale/eu.js
src/test/locale/fa.js
src/test/locale/fi.js
src/test/locale/fo.js
src/test/locale/fr-ca.js
src/test/locale/fr-ch.js
src/test/locale/fr.js
src/test/locale/fy.js
src/test/locale/gd.js
src/test/locale/gl.js
src/test/locale/he.js
src/test/locale/hi.js
src/test/locale/hr.js
src/test/locale/hu.js
src/test/locale/hy-am.js
src/test/locale/id.js
src/test/locale/is.js
src/test/locale/it.js
src/test/locale/ja.js
src/test/locale/jv.js
src/test/locale/ka.js
src/test/locale/kk.js
src/test/locale/km.js
src/test/locale/ko.js
src/test/locale/lb.js
src/test/locale/lo.js
src/test/locale/lt.js
src/test/locale/lv.js
src/test/locale/me.js
src/test/locale/mk.js
src/test/locale/ml.js
src/test/locale/mr.js
src/test/locale/ms-my.js
src/test/locale/ms.js
src/test/locale/my.js
src/test/locale/nb.js
src/test/locale/ne.js
src/test/locale/nl.js
src/test/locale/nn.js
src/test/locale/pa-in.js
src/test/locale/pl.js
src/test/locale/pt-br.js
src/test/locale/pt.js
src/test/locale/ro.js
src/test/locale/ru.js
src/test/locale/se.js
src/test/locale/si.js
src/test/locale/sk.js
src/test/locale/sl.js
src/test/locale/sq.js
src/test/locale/sr-cyrl.js
src/test/locale/sr.js
src/test/locale/sv.js
src/test/locale/sw.js
src/test/locale/ta.js
src/test/locale/te.js
src/test/locale/th.js
src/test/locale/tl-ph.js
src/test/locale/tlh.js
src/test/locale/tr.js
src/test/locale/tzl.js
src/test/locale/tzm-latn.js
src/test/locale/tzm.js
src/test/locale/uk.js
src/test/locale/uz.js
src/test/locale/vi.js
src/test/locale/zh-cn.js
src/test/locale/zh-tw.js

index 61bc10d721303805b0403002be990d481f2b1af4..d396ee1f2efd8b5c589c7838d931e37d2d5f7705 100644 (file)
@@ -152,14 +152,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                   'Vandag om 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Vandag om 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Vandag om 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Môre om 02:00',    'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Vandag om 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Gister om 02:00',   'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Vandag om 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Vandag om 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Vandag om 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Môre om 12:00',       'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Vandag om 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Gister om 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index a993e78119339c5436cfda116afc140a88082d1b..4d6d829db92f4c4f2586498b6683b0f779a1801d 100644 (file)
@@ -152,14 +152,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'اليوم على الساعة 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'اليوم على الساعة 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'اليوم على الساعة 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'غدا على الساعة 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'اليوم على الساعة 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'أمس على الساعة 02:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'اليوم على الساعة 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'اليوم على الساعة 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'اليوم على الساعة 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'غدا على الساعة 12:00',      'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'اليوم على الساعة 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'أمس على الساعة 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 30e07c573fa2acb6f80a0731f52a009fef855065..b51965695ba3d16aa60447170c2d165bd2480668 100644 (file)
@@ -152,14 +152,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'اليوم على الساعة ٠٢:٠٠',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'اÙ\84Ù\8aÙ\88Ù\85 Ø¹Ù\84Ù\89 Ø§Ù\84ساعة Ù ٢:٢٥',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'اÙ\84Ù\8aÙ\88Ù\85 Ø¹Ù\84Ù\89 Ø§Ù\84ساعة Ù ٣:٠٠',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'غدا Ø¹Ù\84Ù\89 Ø§Ù\84ساعة Ù Ù¢:٠٠',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'اÙ\84Ù\8aÙ\88Ù\85 Ø¹Ù\84Ù\89 Ø§Ù\84ساعة Ù ١:٠٠',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ø£Ù\85س Ø¹Ù\84Ù\89 Ø§Ù\84ساعة Ù Ù¢:٠٠', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'اليوم على الساعة ١٢:٠٠',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'اÙ\84Ù\8aÙ\88Ù\85 Ø¹Ù\84Ù\89 Ø§Ù\84ساعة Ù¡٢:٢٥',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'اÙ\84Ù\8aÙ\88Ù\85 Ø¹Ù\84Ù\89 Ø§Ù\84ساعة Ù¡٣:٠٠',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'غدا Ø¹Ù\84Ù\89 Ø§Ù\84ساعة Ù¡Ù¢:٠٠',       'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'اÙ\84Ù\8aÙ\88Ù\85 Ø¹Ù\84Ù\89 Ø§Ù\84ساعة Ù¡١:٠٠',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ø£Ù\85س Ø¹Ù\84Ù\89 Ø§Ù\84ساعة Ù¡Ù¢:٠٠',      'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 38ff3cf2dddb7f682e729bc9863ca20e7fa49ba6..942010f8be1cae979615c83903c4de0911d4bed0 100644 (file)
@@ -216,24 +216,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
+    var a = moment().hours(12).minutes(0).seconds(0);
 
-    assert.equal(moment(a).calendar(), 'اليوم على الساعة 02:00', 'today at the same time');
-    assert.equal(moment(a).add({
-        m: 25
-    }).calendar(), 'اليوم على الساعة 02:25', 'Now plus 25 min');
-    assert.equal(moment(a).add({
-        h: 1
-    }).calendar(), 'اليوم على الساعة 03:00', 'Now plus 1 hour');
-    assert.equal(moment(a).add({
-        d: 1
-    }).calendar(), 'غدا على الساعة 02:00', 'tomorrow at the same time');
-    assert.equal(moment(a).subtract({
-        h: 1
-    }).calendar(), 'اليوم على الساعة 01:00', 'Now minus 1 hour');
-    assert.equal(moment(a).subtract({
-        d: 1
-    }).calendar(), 'أمس على الساعة 02:00', 'yesterday at the same time');
+    assert.equal(moment(a).calendar(),                  'اليوم على الساعة 12:00', 'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),     'اليوم على الساعة 12:25', 'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),      'اليوم على الساعة 13:00', 'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),      'غدا على الساعة 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(), 'اليوم على الساعة 11:00', 'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(), 'أمس على الساعة 12:00',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 33c9458849ad07bd22477f62d6164f4218042c34..dc847ab653e4ced063c10d8e9a920914c4fe2d85 100644 (file)
@@ -167,14 +167,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'اليوم عند الساعة ٠٢:٠٠',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'اÙ\84Ù\8aÙ\88Ù\85 Ø¹Ù\86د Ø§Ù\84ساعة Ù ٢:٢٥',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'اÙ\84Ù\8aÙ\88Ù\85 Ø¹Ù\86د Ø§Ù\84ساعة Ù ٣:٠٠',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'غدÙ\8bا Ø¹Ù\86د Ø§Ù\84ساعة Ù Ù¢:٠٠',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'اÙ\84Ù\8aÙ\88Ù\85 Ø¹Ù\86د Ø§Ù\84ساعة Ù ١:٠٠',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ø£Ù\85س Ø¹Ù\86د Ø§Ù\84ساعة Ù Ù¢:٠٠', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'اليوم عند الساعة ١٢:٠٠',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'اÙ\84Ù\8aÙ\88Ù\85 Ø¹Ù\86د Ø§Ù\84ساعة Ù¡٢:٢٥',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'اÙ\84Ù\8aÙ\88Ù\85 Ø¹Ù\86د Ø§Ù\84ساعة Ù¡٣:٠٠',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'غدÙ\8bا Ø¹Ù\86د Ø§Ù\84ساعة Ù¡Ù¢:٠٠',      'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'اÙ\84Ù\8aÙ\88Ù\85 Ø¹Ù\86د Ø§Ù\84ساعة Ù¡١:٠٠',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ø£Ù\85س Ø¹Ù\86د Ø§Ù\84ساعة Ù¡Ù¢:٠٠',       'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index c005d83345815eea2eeabce6e60a83e79b51b321..b87736fd0b773d8e5c70b74dced8ff1301171546 100644 (file)
@@ -162,14 +162,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'bugün saat 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'bugün saat 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'bugün saat 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'sabah saat 02:00',     'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'bugün saat 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'dünən 02:00',          'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'bugün saat 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'bugün saat 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'bugün saat 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'sabah saat 12:00',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'bugün saat 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'dünən 12:00',          'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index b1db24c3f08d0ab87720455e4e11f97dfc1667c3..275469cda2909347cb0a0478fd8652071faf8b3c 100644 (file)
@@ -188,14 +188,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
+    var a = moment().hours(12).minutes(0).seconds(0);
 
-    assert.equal(moment(a).calendar(),                     'Сёння ў 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Сёння ў 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Сёння ў 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Заўтра ў 02:00',      'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Сёння ў 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Учора ў 02:00',       'yesterday at the same time');
+    assert.equal(moment(a).calendar(),                   'Сёння ў 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Сёння ў 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Сёння ў 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Заўтра ў 12:00',    'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Сёння ў 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Учора ў 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 28f10d1cbf485978961a55577f8fdf9e7a8a2035..66c1bcddf68b646b79e1740b629c47eaae9a938f 100644 (file)
@@ -152,14 +152,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Днес в 2:00',  'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Днес в 2:25',  'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Днес в 3:00',  'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Утре в 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Днес в 1:00',  'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Вчера в 2:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Днес в 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Днес в 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Днес в 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Утре в 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Днес в 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Вчера в 12:00', 'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 1006050df42ea394560d0ef924b8ca8b4f493135..20e4e057dc87028af2a72b7c39976ecc314fbd10 100644 (file)
@@ -150,14 +150,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'আজ রাত ২:০০ সময়',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'à¦\86à¦\9c à¦°à¦¾à¦¤ à§¨:২৫ à¦¸à¦®à§\9f',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 3}).calendar(),       'à¦\86à¦\9c à¦¸à¦\95াল à§«:০০ à¦¸à¦®à§\9f',     'Now plus 3 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'à¦\86à¦\97ামà§\80à¦\95াল à¦°à¦¾à¦¤ à§¨:০০ à¦¸à¦®à§\9f',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à¦\86à¦\9c à¦°à¦¾à¦¤ à§§:০০ à¦¸à¦®à§\9f',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'à¦\97তà¦\95াল à¦°à¦¾à¦¤ à§¨:০০ à¦¸à¦®à§\9f', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'আজ দুপুর ১২:০০ সময়',       'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'à¦\86à¦\9c à¦¦à§\81পà§\81র à§§à§¨:২৫ à¦¸à¦®à§\9f',       'Now plus 25 min');
+    assert.equal(moment(a).add({h: 3}).calendar(),       'à¦\86à¦\9c à¦¦à§\81পà§\81র à§©:০০ à¦¸à¦®à§\9f',        'Now plus 3 hours');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'à¦\86à¦\97ামà§\80à¦\95াল à¦¦à§\81পà§\81র à§§à§¨:০০ à¦¸à¦®à§\9f', 'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à¦\86à¦\9c à¦¦à§\81পà§\81র à§§à§§:০০ à¦¸à¦®à§\9f',       'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'à¦\97তà¦\95াল à¦¦à§\81পà§\81র à§§à§¨:০০ à¦¸à¦®à§\9f',    'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 2ca415c05c66edacd5efd84ee163573dca0cdd05..9fbcb44393090cfbe4ab09d4fda572e3e54c3ed0 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'དི་རིང མཚན་མོ ༢:༠༠',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'à½\91ིà¼\8bརིà½\84 à½\98à½\9aà½\93à¼\8bà½\98ོ à¼¢:༢༥',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 3}).calendar(),       'à½\91ིà¼\8bརིà½\84 à½\9eོà½\82སà¼\8bà½\80ས à¼¥:༠༠',     'Now plus 3 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'སà½\84à¼\8bà½\89ིà½\93 à½\98à½\9aà½\93à¼\8bà½\98ོ ༢:༠༠',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à½\91ིà¼\8bརིà½\84 à½\98à½\9aà½\93à¼\8bà½\98ོ à¼¡:༠༠',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'à½\81à¼\8bསà½\84 à½\98à½\9aà½\93à¼\8bà½\98ོ à¼¢:༠༠', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'དི་རིང ཉིན་གུང ༡༢:༠༠',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'à½\91ིà¼\8bརིà½\84 à½\89ིà½\93à¼\8bà½\82ུà½\84 à¼¡à¼¢:༢༥',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 3}).calendar(),       'à½\91ིà¼\8bརིà½\84 à½\89ིà½\93à¼\8bà½\82ུà½\84 à¼£:༠༠',   'Now plus 3 hours');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'སà½\84à¼\8bà½\89ིà½\93 à½\89ིà½\93à¼\8bà½\82ུà½\84 à¼¡༢:༠༠',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à½\91ིà¼\8bརིà½\84 à½\89ིà½\93à¼\8bà½\82ུà½\84 à¼¡à¼¡:༠༠',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'à½\81à¼\8bསà½\84 à½\89ིà½\93à¼\8bà½\82ུà½\84 à¼¡à¼¢:༠༠',    'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index f62424cfeb70095f170cc440ad4f395526afa244..7fa5aee354796dcfcb5a04618b1caf819633e4a5 100644 (file)
@@ -155,14 +155,14 @@ test('fromNow', function (assert) {
 test('calendar day', function (assert) {
     moment.locale('br');
 
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Hiziv da 2e00 AM',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Hiziv da 2e25 AM',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Hiziv da 3e00 AM',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Warc\'hoazh da 2e00 AM',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hiziv da 1e00 AM',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Dec\'h da 2e00 AM', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Hiziv da 12e00 PM',        'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Hiziv da 12e25 PM',        'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Hiziv da 1e00 PM',         'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Warc\'hoazh da 12e00 PM',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hiziv da 11e00 AM',        'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Dec\'h da 12e00 PM',       'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 023b3536be1949554323fd78be9779e200912a76..e4d9c5973004205316ce65f8351791762d361e7b 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'danas u 2:00',  'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'danas u 2:25',  'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'danas u 3:00',  'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'sutra u 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'danas u 1:00',  'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'jučer u 2:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'danas u 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'danas u 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'danas u 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'sutra u 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'danas u 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'jučer u 12:00',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 1237363c3900b04b4e91570427d0ba8970a0f946..b769c821fdbc9c3d0e09de48544c1ec00868ba69 100644 (file)
@@ -151,15 +151,15 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                         'avui a les 2:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),          'avui a les 2:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),           'avui a les 3:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),           'demà a les 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).add({d: 1, h : -1}).calendar(),   'demà a la 1:00',   'tomorrow minus 1 hour');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),      'avui a la 1:00',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),      'ahir a les 2:00',    'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                       'avui a les 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),          'avui a les 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),           'avui a les 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),           'demà a les 12:00',     'tomorrow at the same time');
+    assert.equal(moment(a).add({d: 1, h : -1}).calendar(),   'demà a les 11:00',     'tomorrow minus 1 hour');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),      'avui a les 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),      'ahir a les 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index b5730015d4ea4cc6b311b8ae76709b0d7c4a2949..440ea3b1b0352b7c236637a5aeb3ff3949e0bbcc 100644 (file)
@@ -194,14 +194,14 @@ test('fromNow (past)', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
+    var a = moment().hours(12).minutes(0).seconds(0);
 
-    assert.equal(moment(a).calendar(),                     'dnes v 2:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'dnes v 2:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'dnes v 3:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'zítra v 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'dnes v 1:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'včera v 2:00',     'yesterday at the same time');
+    assert.equal(moment(a).calendar(),                   'dnes v 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'dnes v 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'dnes v 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'zítra v 12:00',    'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'dnes v 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'včera v 12:00',    'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 3c31d99b11b8ca725cf9c508faa6176d14fc967e..fed9804a5876f95d0a797321dfb6b4e74d5c27cc 100644 (file)
@@ -153,13 +153,13 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-    assert.equal(moment(a).calendar(),                   'Паян 02:00 сехетре',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Паян 02:25 сехетре',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Паян 03:00 сехетре',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Ыран 02:00 сехетре',     'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Паян 01:00 сехетре',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ӗнер 02:00 сехетре',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+    assert.equal(moment(a).calendar(),                   'Паян 12:00 сехетре',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Паян 12:25 сехетре',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Паян 13:00 сехетре',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Ыран 12:00 сехетре',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Паян 11:00 сехетре',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ӗнер 12:00 сехетре',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 25af0fb136bdd06b12021802063957ce517507ca..d142de666255e9dcf383e13b396f9827f810faaa 100644 (file)
@@ -147,18 +147,18 @@ test('fromNow', function (assert) {
     assert.equal(moment().add({d: 5}).fromNow(), 'mewn 5 diwrnod', 'in 5 days');
 });
 
-test('same day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Heddiw am 02:00',    'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Heddiw am 02:25',    'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Heddiw am 03:00',    'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Yfory am 02:00',         'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Heddiw am 01:00',    'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ddoe am 02:00',           'yesterday at the same time');
+test('calendar day', function (assert) {
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Heddiw am 12:00',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Heddiw am 12:25',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Heddiw am 13:00',    'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Yfory am 12:00',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Heddiw am 11:00',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ddoe am 12:00',      'yesterday at the same time');
 });
 
-test('same next week', function (assert) {
+test('calendar next week', function (assert) {
     var i, m;
 
     for (i = 2; i < 7; i++) {
@@ -171,7 +171,7 @@ test('same next week', function (assert) {
     }
 });
 
-test('same last week', function (assert) {
+test('calendar last week', function (assert) {
     var i, m;
 
     for (i = 2; i < 7; i++) {
@@ -184,7 +184,7 @@ test('same last week', function (assert) {
     }
 });
 
-test('same all else', function (assert) {
+test('calendar all else', function (assert) {
     var weeksAgo = moment().subtract({w: 1}),
         weeksFromNow = moment().add({w: 1});
 
index 713432f5db069fe692584c313f7754f6780b26f9..fc982d4c33bde7399ea69a149c05dd1a2f9dc629 100644 (file)
@@ -150,6 +150,58 @@ test('fromNow', function (assert) {
     assert.equal(moment().add({d: 5}).fromNow(), 'om 5 dage', 'in 5 days');
 });
 
+
+test('calendar day', function (assert) {
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'I dag kl. 12:00',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'I dag kl. 12:25',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'I dag kl. 13:00',    'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'I morgen kl. 12:00', 'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'I dag kl. 11:00',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'I går kl. 12:00',    'yesterday at the same time');
+});
+
+test('calendar next week', function (assert) {
+    var i, m;
+
+    for (i = 2; i < 7; i++) {
+        m = moment().add({d: i});
+        assert.equal(m.calendar(),       m.format('dddd [kl.] LT'),  'Today + ' + i + ' days current time');
+        m.hours(0).minutes(0).seconds(0).milliseconds(0);
+        assert.equal(m.calendar(),       m.format('dddd [kl.] LT'),  'Today + ' + i + ' days beginning of day');
+        m.hours(23).minutes(59).seconds(59).milliseconds(999);
+        assert.equal(m.calendar(),       m.format('dddd [kl.] LT'),  'Today + ' + i + ' days end of day');
+    }
+});
+
+test('calendar last week', function (assert) {
+    var i, m;
+
+    for (i = 2; i < 7; i++) {
+        m = moment().subtract({d: i});
+        assert.equal(m.calendar(),       m.format('[sidste] dddd [kl] LT'),  'Today - ' + i + ' days current time');
+        m.hours(0).minutes(0).seconds(0).milliseconds(0);
+        assert.equal(m.calendar(),       m.format('[sidste] dddd [kl] LT'),  'Today - ' + i + ' days beginning of day');
+        m.hours(23).minutes(59).seconds(59).milliseconds(999);
+        assert.equal(m.calendar(),       m.format('[sidste] dddd [kl] LT'),  'Today - ' + i + ' days end of day');
+    }
+});
+
+test('calendar all else', function (assert) {
+    var weeksAgo = moment().subtract({w: 1}),
+        weeksFromNow = moment().add({w: 1});
+
+    assert.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  '1 week ago');
+    assert.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  'in 1 week');
+
+    weeksAgo = moment().subtract({w: 2});
+    weeksFromNow = moment().add({w: 2});
+
+    assert.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  '2 weeks ago');
+    assert.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  'in 2 weeks');
+});
+
 test('weeks year starting sunday formatted', function (assert) {
     assert.equal(moment([2012, 0,  1]).format('w ww wo'), '52 52 52.', 'Jan  1 2012 should be week 52');
     assert.equal(moment([2012, 0,  2]).format('w ww wo'),   '1 01 1.', 'Jan  2 2012 should be week 1');
index b7aaebbc74850e24ad335fcbb601208e6cead07b..86e00514e69800f8334e6a36aae6e51401bca94e 100644 (file)
@@ -148,14 +148,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(), 'heute um 02:00 Uhr', 'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(), 'heute um 02:25 Uhr', 'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(), 'heute um 03:00 Uhr', 'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(), 'morgen um 02:00 Uhr', 'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(), 'heute um 01:00 Uhr', 'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(), 'gestern um 02:00 Uhr', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                  'heute um 12:00 Uhr',   'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),     'heute um 12:25 Uhr',   'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),      'heute um 13:00 Uhr',   'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),      'morgen um 12:00 Uhr',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(), 'heute um 11:00 Uhr',   'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(), 'gestern um 12:00 Uhr', 'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 8373b16f29e086c11456ef80210a93d764b3d29b..51ed99918222995050ea68290629b2a0eb69b836 100644 (file)
@@ -147,14 +147,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'heute um 02:00 Uhr',   'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'heute um 02:25 Uhr',   'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'heute um 03:00 Uhr',   'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'morgen um 02:00 Uhr',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'heute um 01:00 Uhr',   'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'gestern um 02:00 Uhr', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'heute um 12:00 Uhr',   'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'heute um 12:25 Uhr',   'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'heute um 13:00 Uhr',   'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'morgen um 12:00 Uhr',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'heute um 11:00 Uhr',   'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'gestern um 12:00 Uhr', 'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index bb6020c05a8f9aaad7c4d7e87df88f05d9cfdce1..071ea3971d82d221a9283d1a560d632a3189316d 100644 (file)
@@ -102,3 +102,103 @@ test('format week', function (assert) {
         assert.equal(moment([2011, 0, 2 + i]).format('dddd'), expected[i]);
     }
 });
+
+
+test('from', function (assert) {
+    var start = moment([2007, 1, 28]);
+    assert.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true),  'ސިކުންތުކޮޅެއް',  '44 seconds = a few seconds');
+    assert.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true),  'މިނިޓެއް',        '45 seconds = a minute');
+    assert.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true),  'މިނިޓެއް',        '89 seconds = a minute');
+    assert.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true),  'މިނިޓު 2',        '90 seconds = 2 minutes');
+    assert.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true),  'މިނިޓު 44',       '44 minutes = 44 minutes');
+    assert.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true),  'ގަޑިއިރެއް',      '45 minutes = an hour');
+    assert.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true),  'ގަޑިއިރެއް',      '89 minutes = an hour');
+    assert.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true),  'ގަޑިއިރު 2',      '90 minutes = 2 hours');
+    assert.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true),   'ގަޑިއިރު 5',      '5 hours = 5 hours');
+    assert.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true),  'ގަޑިއިރު 21',     '21 hours = 21 hours');
+    assert.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true),  'ދުވަހެއް',        '22 hours = a day');
+    assert.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true),  'ދުވަހެއް',        '35 hours = a day');
+    assert.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true),  'ދުވަސް 2',        '36 hours = 2 days');
+    assert.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true),   'ދުވަހެއް',        '1 day = a day');
+    assert.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true),   'ދުވަސް 5',        '5 days = 5 days');
+    assert.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true),  'ދުވަސް 25',       '25 days = 25 days');
+    assert.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true),  'މަހެއް',          '26 days = a month');
+    assert.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true),  'މަހެއް',          '30 days = a month');
+    assert.equal(start.from(moment([2007, 1, 28]).add({d: 43}), true),  'މަހެއް',          '43 days = a month');
+    assert.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true),  'މަސް 2',          '46 days = 2 months');
+    assert.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true),  'މަސް 2',          '75 days = 2 months');
+    assert.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true),  'މަސް 3',          '76 days = 3 months');
+    assert.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true),   'މަހެއް',          '1 month = a month');
+    assert.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true),   'މަސް 5',          '5 months = 5 months');
+    assert.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), 'އަހަރެއް',        '345 days = a year');
+    assert.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), 'އަހަރު 2',        '548 days = 2 years');
+    assert.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true),   'އަހަރެއް',        '1 year = a year');
+    assert.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true),   'އަހަރު 5',        '5 years = 5 years');
+});
+
+test('suffix', function (assert) {
+    assert.equal(moment(30000).from(0), 'ތެރޭގައި ސިކުންތުކޮޅެއް', 'prefix');
+    assert.equal(moment(0).from(30000), 'ކުރިން ސިކުންތުކޮޅެއް', 'suffix');
+});
+
+test('fromNow', function (assert) {
+    assert.equal(moment().add({s: 30}).fromNow(), 'ތެރޭގައި ސިކުންތުކޮޅެއް', 'in a few seconds');
+    assert.equal(moment().add({d: 5}).fromNow(), 'ތެރޭގައި ދުވަސް 5', 'in 5 days');
+});
+
+test('calendar day', function (assert) {
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'މިއަދު 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'މިއަދު 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'މިއަދު 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'މާދަމާ 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'މިއަދު 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'އިއްޔެ 12:00',  'yesterday at the same time');
+});
+
+test('calendar next week', function (assert) {
+    var i, m;
+    for (i = 2; i < 7; i++) {
+        m = moment().add({d: i});
+        assert.equal(m.calendar(),       m.format('dddd LT'),  'Today + ' + i + ' days current time');
+        m.hours(0).minutes(0).seconds(0).milliseconds(0);
+        assert.equal(m.calendar(),       m.format('dddd LT'),  'Today + ' + i + ' days beginning of day');
+        m.hours(23).minutes(59).seconds(59).milliseconds(999);
+        assert.equal(m.calendar(),       m.format('dddd LT'),  'Today + ' + i + ' days end of day');
+    }
+});
+
+test('calendar last week', function (assert) {
+    var i, m;
+    for (i = 2; i < 7; i++) {
+        m = moment().subtract({d: i});
+        assert.equal(m.calendar(),       m.format('[ފާއިތުވި] dddd LT'),  'Today + ' + i + ' days current time');
+        m.hours(0).minutes(0).seconds(0).milliseconds(0);
+        assert.equal(m.calendar(),       m.format('[ފާއިތުވި] dddd LT'),  'Today + ' + i + ' days beginning of day');
+        m.hours(23).minutes(59).seconds(59).milliseconds(999);
+        assert.equal(m.calendar(),       m.format('[ފާއިތުވި] dddd LT'),  'Today + ' + i + ' days end of day');
+    }
+});
+
+test('calendar all else', function (assert) {
+    var weeksAgo = moment().subtract({w: 1}),
+        weeksFromNow = moment().add({w: 1});
+
+    assert.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  '1 week ago');
+    assert.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  'in 1 week');
+
+    weeksAgo = moment().subtract({w: 2});
+    weeksFromNow = moment().add({w: 2});
+
+    assert.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  '2 weeks ago');
+    assert.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  'in 2 weeks');
+});
+
+test('weeks year starting sunday formatted', function (assert) {
+    assert.equal(moment([2012, 0,  1]).format('w ww wo'),   '1 01 1', 'Jan  1 2012 should be week 1');
+    assert.equal(moment([2012, 0,  2]).format('w ww wo'),   '1 01 1', 'Jan  2 2012 should be week 1');
+    assert.equal(moment([2012, 0,  8]).format('w ww wo'),   '2 02 2', 'Jan  8 2012 should be week 2');
+    assert.equal(moment([2012, 0,  9]).format('w ww wo'),   '2 02 2', 'Jan  9 2012 should be week 2');
+    assert.equal(moment([2012, 0, 15]).format('w ww wo'),   '3 03 3', 'Jan 15 2012 should be week 3');
+});
index f4a1a0dd628634eaf3493425f763edaf043b896d..738490dc37b560b0e52689182749261681304e69 100644 (file)
@@ -199,14 +199,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Σήμερα στις 2:00 ΠΜ',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Σήμερα στις 2:25 ΠΜ',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'ΣήμεÏ\81α Ï\83Ï\84ιÏ\82 3:00 Î Î\9c',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Αύριο στις 2:00 ΠΜ',      'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'ΣήμεÏ\81α Ï\83Ï\84η 1:00 Î Î\9c',        'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Χθες στις 2:00 ΠΜ',       'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Σήμερα στις 12:00 ΜΜ',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Σήμερα στις 12:25 ΜΜ',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'ΣήμεÏ\81α Ï\83Ï\84η 1:00 Î\9cÎ\9c',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Αύριο στις 12:00 ΜΜ',      'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'ΣήμεÏ\81α Ï\83Ï\84ιÏ\82 11:00 Î Î\9c',      'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Χθες στις 12:00 ΜΜ',       'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index da7ac793125764061f875e2fdef919adffc37188..db7aef2c95e339f5aef7c5913c3a22cd361266ac 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Today at 2:00 AM',      'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at 2:25 AM',      'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at 3:00 AM',      'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at 2:00 AM',   'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at 1:00 AM',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at 2:00 AM',  'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Today at 12:00 PM',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at 12:25 PM',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at 1:00 PM',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at 12:00 PM',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at 11:00 AM',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at 12:00 PM', 'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 64329f8cde6935f863a69e021ee6a39c70bddace..54516e8948aedc0f25c96f3349a7a804ab5cfa98 100644 (file)
@@ -159,14 +159,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Today at 2:00 AM',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at 2:25 AM',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at 3:00 AM',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at 2:00 AM',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at 1:00 AM',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at 2:00 AM', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Today at 12:00 PM',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at 12:25 PM',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at 1:00 PM',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at 12:00 PM',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at 11:00 AM',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at 12:00 PM', 'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 76eb55354651eb619da946c240b658beae924ee2..0b98fe4b326807a21ddfc08fffb2b8458ce5871c 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Today at 02:00',      'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at 02:25',      'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at 03:00',      'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at 02:00',   'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at 01:00',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at 02:00',  'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Today at 12:00',      'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at 12:25',      'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at 13:00',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at 12:00',   'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at 11:00',      'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at 12:00',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index f0d3bf7fabb9336f8d58e1d5a984410679eedb5b..6f5a781830262179b4d940ace2a00b90e594b5e9 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Today at 02:00',      'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at 02:25',      'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at 03:00',      'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at 02:00',   'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at 01:00',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at 02:00',  'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Today at 12:00',      'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at 12:25',      'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at 13:00',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at 12:00',   'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at 11:00',      'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at 12:00',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index a87950dbab99866940720262e5c2a2a7538e1cfd..1f596cf491ef050860372e0982d2618e4d83ff18 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Today at 2:00 AM',      'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at 2:25 AM',      'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at 3:00 AM',      'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at 2:00 AM',   'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at 1:00 AM',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at 2:00 AM',  'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Today at 12:00 PM',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at 12:25 PM',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at 1:00 PM',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at 12:00 PM',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at 11:00 AM',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at 12:00 PM', 'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index d3b67f4cb7dff450dfabd5a51d59c105e5accbc2..b8a16c584360832260b6aebb056d7a5721119399 100644 (file)
@@ -160,14 +160,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Today at 2:00 AM',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at 2:25 AM',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at 3:00 AM',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at 2:00 AM',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at 1:00 AM',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at 2:00 AM', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Today at 12:00 PM',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Today at 12:25 PM',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Today at 1:00 PM',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Tomorrow at 12:00 PM',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Today at 11:00 AM',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Yesterday at 12:00 PM', 'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index a2c4dc8de358cb810d6bde2fc8810152a2acb073..b0d7993ed9dc4fd139192185cf22a9371f1ec898 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Hodiaŭ je 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Hodiaŭ je 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Hodiaŭ je 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Morgaŭ je 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hodiaŭ je 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Hieraŭ je 02:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Hodiaŭ je 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Hodiaŭ je 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Hodiaŭ je 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Morgaŭ je 12:00',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hodiaŭ je 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Hieraŭ je 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 500271cdebc436c61503d3135cc6a905b34b22ff..f9ee15c50f6c0ddee3d8399b2e0666056e366675 100644 (file)
@@ -152,15 +152,15 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                       'hoy a las 2:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),          'hoy a las 2:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),           'hoy a las 3:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),           'mañana a las 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).add({d: 1, h : -1}).calendar(),   'mañana a la 1:00',   'tomorrow minus 1 hour');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),      'hoy a la 1:00',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),      'ayer a las 2:00',    'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                       'hoy a las 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),          'hoy a las 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),           'hoy a las 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),           'mañana a las 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).add({d: 1, h : -1}).calendar(),   'mañana a las 11:00',   'tomorrow minus 1 hour');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),      'hoy a las 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),      'ayer a las 12:00',    'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index b39247c82eb4d4bb35994c25c3a1a01ab1c5bfd3..cdccead26212071c0582c3ee757d80ba938234c9 100644 (file)
@@ -175,14 +175,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Täna, 2:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Täna, 2:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Täna, 3:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Homme, 2:00',    'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Täna, 1:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Eile, 2:00',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Täna, 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Täna, 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Täna, 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Homme, 12:00',    'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Täna, 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Eile, 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 75edd4ff0109e38f462d191baf226b1418897eb4..c84823265ca049cf845c6af642c3c02eab35c4e5 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'gaur 02:00etan',  'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'gaur 02:25etan',  'now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'gaur 03:00etan',  'now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'bihar 02:00etan', 'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'gaur 01:00etan',  'now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'atzo 02:00etan',  'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'gaur 12:00etan',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'gaur 12:25etan',  'now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'gaur 13:00etan',  'now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'bihar 12:00etan', 'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'gaur 11:00etan',  'now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'atzo 12:00etan',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 19b6316281adff276bfeb362800f37a1c65a1243..63c99bb3fe35dfea1d93464c1cfbf16ae24d3ddb 100644 (file)
@@ -144,14 +144,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'امروز ساعت ۰۲:۰۰', 'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'اÙ\85رÙ\88ز Ø³Ø§Ø¹Øª Û°۲:۲۵', 'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'اÙ\85رÙ\88ز Ø³Ø§Ø¹Øª Û°۳:۰۰', 'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Ù\81ردا Ø³Ø§Ø¹Øª Û°۲:۰۰', 'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'اÙ\85رÙ\88ز Ø³Ø§Ø¹Øª Û°۱:۰۰', 'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'دÛ\8cرÙ\88ز Ø³Ø§Ø¹Øª Û°۲:۰۰', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'امروز ساعت ۱۲:۰۰', 'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'اÙ\85رÙ\88ز Ø³Ø§Ø¹Øª Û±۲:۲۵', 'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'اÙ\85رÙ\88ز Ø³Ø§Ø¹Øª Û±۳:۰۰', 'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Ù\81ردا Ø³Ø§Ø¹Øª Û±۲:۰۰', 'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'اÙ\85رÙ\88ز Ø³Ø§Ø¹Øª Û±۱:۰۰', 'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'دÛ\8cرÙ\88ز Ø³Ø§Ø¹Øª Û±۲:۰۰', 'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 05e32f06320c71818c1ddac71f18033a1755e3cc..78b67d62edf47eee0894651476ee48e0e20807a8 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'tänään klo 02.00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'tänään klo 02.25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'tänään klo 03.00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'huomenna klo 02.00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'tänään klo 01.00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'eilen klo 02.00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'tänään klo 12.00',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'tänään klo 12.25',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'tänään klo 13.00',    'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'huomenna klo 12.00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'tänään klo 11.00',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'eilen klo 12.00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 9c91b1e4a051cf7903eb6dc64c20e5f28d08b53c..31cc36d3f4f2f08c7624f8cc7dbb101e8ebcffcd 100644 (file)
@@ -150,6 +150,57 @@ test('fromNow', function (assert) {
     assert.equal(moment().add({d: 5}).fromNow(), 'um 5 dagar', 'in 5 days');
 });
 
+
+test('calendar day', function (assert) {
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Í dag kl. 12:00',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Í dag kl. 12:25',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Í dag kl. 13:00',    'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Í morgin kl. 12:00', 'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Í dag kl. 11:00',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Í gjár kl. 12:00',   'yesterday at the same time');
+});
+
+test('calendar next week', function (assert) {
+    var i, m;
+
+    for (i = 2; i < 7; i++) {
+        m = moment().add({d: i});
+        assert.equal(m.calendar(),       m.format('dddd [kl.] LT'),  'today + ' + i + ' days current time');
+        m.hours(0).minutes(0).seconds(0).milliseconds(0);
+        assert.equal(m.calendar(),       m.format('dddd [kl.] LT'),  'today + ' + i + ' days beginning of day');
+        m.hours(23).minutes(59).seconds(59).milliseconds(999);
+        assert.equal(m.calendar(),       m.format('dddd [kl.] LT'),  'today + ' + i + ' days end of day');
+    }
+});
+
+test('calendar last week', function (assert) {
+    var i, m;
+    for (i = 2; i < 7; i++) {
+        m = moment().subtract({d: i});
+        assert.equal(m.calendar(),       m.format('[síðstu] dddd [kl] LT'),  'today - ' + i + ' days current time');
+        m.hours(0).minutes(0).seconds(0).milliseconds(0);
+        assert.equal(m.calendar(),       m.format('[síðstu] dddd [kl] LT'),  'today - ' + i + ' days beginning of day');
+        m.hours(23).minutes(59).seconds(59).milliseconds(999);
+        assert.equal(m.calendar(),       m.format('[síðstu] dddd [kl] LT'),  'today - ' + i + ' days end of day');
+    }
+});
+
+test('calendar all else', function (assert) {
+    var weeksAgo = moment().subtract({w: 1}),
+        weeksFromNow = moment().add({w: 1});
+
+    assert.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  'yksi viikko sitten');
+    assert.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  'yhden viikon päästä');
+
+    weeksAgo = moment().subtract({w: 2});
+    weeksFromNow = moment().add({w: 2});
+
+    assert.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  'kaksi viikkoa sitten');
+    assert.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  'kaden viikon päästä');
+});
+
 test('weeks year starting sunday formatted', function (assert) {
     assert.equal(moment([2012, 0,  1]).format('w ww wo'), '52 52 52.', 'Jan  1 2012 should be week 52');
     assert.equal(moment([2012, 0,  2]).format('w ww wo'),   '1 01 1.', 'Jan  2 2012 should be week 1');
index deb5e6119a0a48ccfb75471e4fc2d7c8e7c09294..e9144608ce81aa61de1560bd260aa5455baa6573 100644 (file)
@@ -156,14 +156,14 @@ test('fromNow', function (assert) {
 });
 
 test('same day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Aujourd\'hui à 02:00',    'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Aujourd\'hui à 02:25',    'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Aujourd\'hui à 03:00',    'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Demain à 02:00',         'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Aujourd\'hui à 01:00',    'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Hier à 02:00',           'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Aujourd\'hui à 12:00',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Aujourd\'hui à 12:25',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Aujourd\'hui à 13:00',    'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Demain à 12:00',          'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Aujourd\'hui à 11:00',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Hier à 12:00',            'yesterday at the same time');
 });
 
 test('same next week', function (assert) {
index cf6763e1f4689c39f2625f6c519543607ad92f54..6a3aa8f4752648bd4daaaa92e0aba5b2a8353b8c 100644 (file)
@@ -156,14 +156,14 @@ test('fromNow', function (assert) {
 });
 
 test('same day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Aujourd\'hui à 02:00',    'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Aujourd\'hui à 02:25',    'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Aujourd\'hui à 03:00',    'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Demain à 02:00',         'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Aujourd\'hui à 01:00',    'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Hier à 02:00',           'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Aujourd\'hui à 12:00',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Aujourd\'hui à 12:25',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Aujourd\'hui à 13:00',    'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Demain à 12:00',          'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Aujourd\'hui à 11:00',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Hier à 12:00',            'yesterday at the same time');
 });
 
 test('same next week', function (assert) {
index f686570a692c9239c38b7920bba53e98fd9d82ed..83297df40f308f8ff8219003fa0546b25724ed07 100644 (file)
@@ -148,14 +148,14 @@ test('fromNow', function (assert) {
 });
 
 test('same day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Aujourd\'hui à 02:00',    'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Aujourd\'hui à 02:25',    'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Aujourd\'hui à 03:00',    'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Demain à 02:00',         'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Aujourd\'hui à 01:00',    'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Hier à 02:00',           'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Aujourd\'hui à 12:00',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Aujourd\'hui à 12:25',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Aujourd\'hui à 13:00',    'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Demain à 12:00',          'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Aujourd\'hui à 11:00',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Hier à 12:00',            'yesterday at the same time');
 });
 
 test('same next week', function (assert) {
index 26365c448e82606fc38f85c84c9df91b5db3d6d0..50f02595381885a90505415a54c4978509cff589 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'hjoed om 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'hjoed om 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'hjoed om 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'moarn om 02:00',    'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'hjoed om 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'juster om 02:00',   'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'hjoed om 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'hjoed om 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'hjoed om 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'moarn om 12:00',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'hjoed om 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'juster om 12:00',    'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 158d16fd768716cee950cc198d3d8ade0df211db..30718a86ba07486bf2e03151ed191a5dccf68c7c 100644 (file)
@@ -163,14 +163,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(), 'An-diugh aig 02:00', 'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(), 'An-diugh aig 02:25', 'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(), 'An-diugh aig 03:00', 'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(), 'A-màireach aig 02:00', 'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(), 'An-diugh aig 01:00', 'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(), 'An-dè aig 02:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                  'An-diugh aig 12:00',   'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),     'An-diugh aig 12:25',   'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),      'An-diugh aig 13:00',   'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),      'A-màireach aig 12:00', 'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(), 'An-diugh aig 11:00',   'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(), 'An-dè aig 12:00',      'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 98004547eecf50cba9c6649b87b12edb16459027..420fa36c270d8ee54006ae6d4c9d19351ae242bb 100644 (file)
@@ -153,15 +153,15 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                         'hoxe ás 2:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),          'hoxe ás 2:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),           'hoxe ás 3:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),           'mañá ás 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).add({d: 1, h : -1}).calendar(),   'mañá á 1:00',   'tomorrow minus 1 hour');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),      'hoxe á 1:00',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),      'onte á 2:00',    'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                       'hoxe ás 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),          'hoxe ás 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),           'hoxe ás 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),           'mañá ás 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).add({d: 1, h : -1}).calendar(),   'mañá ás 11:00',   'tomorrow minus 1 hour');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),      'hoxe ás 11:00',   'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),      'onte á 12:00',   'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index e4a479bb079dc03a2646cc520b988f6151b72126..b6aefbe540142d15056861f3aaf5a1a303070c28 100644 (file)
@@ -116,14 +116,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'היום ב־02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'היום ב־02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'היום ב־03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'מחר ב־02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'היום ב־01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'אתמול ב־02:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'היום ב־12:00',   'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'היום ב־12:25',   'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'היום ב־13:00',   'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'מחר ב־12:00',   'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'היום ב־11:00',   'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'אתמול ב־12:00',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index bcc1aa13ef9ec683666e230fdd89391aa4475821..d1ff58aa89fa5cb8df9a59ea9e25142d9e7cd27b 100644 (file)
@@ -150,14 +150,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'आज रात २:०० बजे',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'à¤\86à¤\9c à¤°à¤¾à¤¤ à¥¨:२५ à¤¬à¤\9cà¥\87',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 3}).calendar(),       'à¤\86à¤\9c à¤¸à¥\81बह à¥«:०० à¤¬à¤\9cà¥\87',     'Now plus 3 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'à¤\95ल à¤°à¤¾à¤¤ à¥¨:०० à¤¬à¤\9cà¥\87',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à¤\86à¤\9c à¤°à¤¾à¤¤ à¥§:०० à¤¬à¤\9cà¥\87',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'à¤\95ल à¤°à¤¾à¤¤ à¥¨:०० à¤¬à¤\9cà¥\87', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'आज दोपहर १२:०० बजे',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'à¤\86à¤\9c à¤¦à¥\8bपहर à¥§à¥¨:२५ à¤¬à¤\9cà¥\87',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 3}).calendar(),       'à¤\86à¤\9c à¤¦à¥\8bपहर à¥©:०० à¤¬à¤\9cà¥\87',     'Now plus 3 hours');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'à¤\95ल à¤¦à¥\8bपहर à¥§à¥¨:०० à¤¬à¤\9cà¥\87',    'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à¤\86à¤\9c à¤¦à¥\8bपहर à¥§à¥§:०० à¤¬à¤\9cà¥\87',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'à¤\95ल à¤¦à¥\8bपहर à¥§à¥¨:०० à¤¬à¤\9cà¥\87',    'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index fe7280186a972b6b5105ebdf7060af4240f8f52e..8bfa4b93b0578147ccaa17811539903f18c58657 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'danas u 2:00',  'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'danas u 2:25',  'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'danas u 3:00',  'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'sutra u 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'danas u 1:00',  'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'jučer u 2:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'danas u 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'danas u 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'danas u 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'sutra u 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'danas u 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'jučer u 12:00',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index f39dc32ace9ec05675eaf1c324ad41e53b8788cb..ff0270b96e0f32413a31868608310e9dd163c293 100644 (file)
@@ -164,14 +164,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'ma 2:00-kor',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'ma 2:25-kor',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'ma 3:00-kor',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'holnap 2:00-kor', 'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'ma 1:00-kor',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'tegnap 2:00-kor', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'ma 12:00-kor',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'ma 12:25-kor',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'ma 13:00-kor',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'holnap 12:00-kor', 'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'ma 11:00-kor',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'tegnap 12:00-kor', 'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 97ae9c9e902ffd1f4568c77636769f3f2dcb3288..6964c408a5f073693d982111746aa87378850d92 100644 (file)
@@ -212,14 +212,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
+    var a = moment().hours(12).minutes(0).seconds(0);
 
-    assert.equal(moment(a).calendar(),                     'այսօր 02:00',   'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'այսօր 02:25',   'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'այսօր 03:00',   'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'վաղը 02:00',   'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'այսօր 01:00',   'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'երեկ 02:00',   'yesterday at the same time');
+    assert.equal(moment(a).calendar(),                   'այսօր 12:00',   'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'այսօր 12:25',   'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'այսօր 13:00',   'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'վաղը 12:00',    'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'այսօր 11:00',   'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'երեկ 12:00',    'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 81f81245a2e5d0585fbcab3f9f71cc692a88f867..017739a81c420c75a7714d218f4a22d85207add0 100644 (file)
@@ -114,14 +114,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Hari ini pukul 02.00', 'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Hari ini pukul 02.25', 'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Hari ini pukul 03.00', 'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Besok pukul 02.00',    'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hari ini pukul 01.00', 'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Kemarin pukul 02.00',  'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Hari ini pukul 12.00', 'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Hari ini pukul 12.25', 'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Hari ini pukul 13.00', 'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Besok pukul 12.00',    'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hari ini pukul 11.00', 'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Kemarin pukul 12.00',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index c245d16452bfeec919ab2a4b1af225579fbbe094..31758af99006c4c2f4789afca5e5addbf545d310 100644 (file)
@@ -157,14 +157,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'í dag kl. 2:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'í dag kl. 2:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'í dag kl. 3:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'á morgun kl. 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'í dag kl. 1:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'í gær kl. 2:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'í dag kl. 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'í dag kl. 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'í dag kl. 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'á morgun kl. 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'í dag kl. 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'í gær kl. 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 6a06cb68920d1a72cf248613e04d3c3c21fb3e99..db5b626af5a80738ef1220dd954ad11072bbf439 100644 (file)
@@ -147,14 +147,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                   'Oggi alle 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Oggi alle 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Oggi alle 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Domani alle 02:00',   'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Oggi alle 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ieri alle 02:00',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Oggi alle 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Oggi alle 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Oggi alle 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Domani alle 12:00',   'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Oggi alle 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ieri alle 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index fad5f892f91137e74d743649710756cac12101e4..76f1b6885c4024403dbde0be5738c7ba246047bd 100644 (file)
@@ -114,14 +114,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     '今日 午前2時0分',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'ä»\8aæ\97¥ å\8d\88å\89\8d\99\8225å\88\86',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'ä»\8aæ\97¥ å\8d\88å\89\8d\99\82\88\86',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'æ\98\8eæ\97¥ å\8d\88å\89\8d2時0分',     'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  '今日 午前1時0分',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'æ\98¨æ\97¥ å\8d\88å\89\8d2時0分',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   '今日 午後12時0分',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'ä»\8aæ\97¥ å\8d\88å¾\8c12æ\99\8225å\88\86',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'ä»\8aæ\97¥ å\8d\88å¾\8c\99\82\88\86',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'æ\98\8eæ\97¥ å\8d\88å¾\8c12時0分',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  '今日 午前11時0分',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'æ\98¨æ\97¥ å\8d\88å¾\8c12時0分',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index bcc6a89cb762ab6902e6e3822eb12de90624bdc3..0b46076f2e54fd40c23a9afb0f89f681ae07ad77 100644 (file)
@@ -114,14 +114,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Dinten puniko pukul 02.00', 'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Dinten puniko pukul 02.25', 'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Dinten puniko pukul 03.00', 'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Mbenjang pukul 02.00',    'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Dinten puniko pukul 01.00', 'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Kala wingi pukul 02.00',  'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Dinten puniko pukul 12.00', 'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Dinten puniko pukul 12.25', 'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Dinten puniko pukul 13.00', 'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Mbenjang pukul 12.00',      'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Dinten puniko pukul 11.00', 'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Kala wingi pukul 12.00',    'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 3db602964c0e55918b1ab6cba1536b027e960bd0..c216a717139ae5c2e2fbc1c7f8ecb0b3d2a3a9bf 100644 (file)
@@ -164,14 +164,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'დღეს 2:00 AM-ზე',  'დღეს ამავე დროს');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'დღეს 2:25 AM-ზე',  'ახლანდელ დროს დამატებული 25 წუთი');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'დღეს 3:00 AM-ზე',  'ახლანდელ დროს დამატებული 1 საათი');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'ხვალ 2:00 AM-ზე',  'ხვალ ამავე დროს');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'დღეს 1:00 AM-ზე',  'ახლანდელ დროს გამოკლებული 1 საათი');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'გუშინ 2:00 AM-ზე', 'გუშინ ამავე დროს');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'დღეს 12:00 PM-ზე',  'დღეს ამავე დროს');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'დღეს 12:25 PM-ზე',  'ახლანდელ დროს დამატებული 25 წუთი');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'დღეს 1:00 PM-ზე',   'ახლანდელ დროს დამატებული 1 საათი');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'ხვალ 12:00 PM-ზე',  'ხვალ ამავე დროს');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'დღეს 11:00 AM-ზე',  'ახლანდელ დროს გამოკლებული 1 საათი');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'გუშინ 12:00 PM-ზე', 'გუშინ ამავე დროს');
 });
 
 test('calendar next week', function (assert) {
index 5426806de3338df93d0b880c395e322b54fd83f8..01fd2a56b649a16fce22d416f1385931df81118a 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Бүгін сағат 02:00',      'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Бүгін сағат 02:25',      'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Бүгін сағат 03:00',      'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Ертең сағат 02:00',   'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Бүгін сағат 01:00',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Кеше сағат 02:00',  'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Бүгін сағат 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Бүгін сағат 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Бүгін сағат 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Ертең сағат 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Бүгін сағат 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Кеше сағат 12:00',   'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 6d08d73c2591a38a5d8378fe4104315008d95557..08b3c779b6a1b330e2deb13791aa333423e25da0 100644 (file)
@@ -159,24 +159,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(), 'ថ្ងៃនេះ ម៉ោង 02:00', 'today at the same time');
-    assert.equal(moment(a).add({
-        m: 25
-    }).calendar(), 'ថ្ងៃនេះ ម៉ោង 02:25', 'Now plus 25 min');
-    assert.equal(moment(a).add({
-        h: 1
-    }).calendar(), 'ថ្ងៃនេះ ម៉ោង 03:00', 'Now plus 1 hour');
-    assert.equal(moment(a).add({
-        d: 1
-    }).calendar(), 'ស្អែក ម៉ោង 02:00', 'tomorrow at the same time');
-    assert.equal(moment(a).subtract({
-        h: 1
-    }).calendar(), 'ថ្ងៃនេះ ម៉ោង 01:00', 'Now minus 1 hour');
-    assert.equal(moment(a).subtract({
-        d: 1
-    }).calendar(), 'ម្សិលមិញ ម៉ោង 02:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                  'ថ្ងៃនេះ ម៉ោង 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),     'ថ្ងៃនេះ ម៉ោង 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),      'ថ្ងៃនេះ ម៉ោង 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),      'ស្អែក ម៉ោង 12:00',    'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(), 'ថ្ងៃនេះ ម៉ោង 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(), 'ម្សិលមិញ ម៉ោង 12:00', 'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index f44f98bffe6e58c2777c3669c6ce9e45a9f31a78..89ce004ffa5d7dd499db3908a6ee5df0b85812ab 100644 (file)
@@ -186,14 +186,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     '오늘 오전 2시 0분',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      '오늘 오전 2시 25분',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       '오늘 오전 3시 0분',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       '내일 오전 2시 0분',     'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  '오늘 오전 1시 0분',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  '어제 오전 2시 0분',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   '오늘 오후 12시 0분',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      '오늘 오후 12시 25분',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       '오늘 오후 1시 0분',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       '내일 오후 12시 0분',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  '오늘 오전 11시 0분',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  '어제 오후 12시 0분',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 7f629f28b04b010729e12b72783c7003394a73da..d54cc4fd560169dad7700b8ee0362d7b079d75ce 100644 (file)
@@ -122,6 +122,30 @@ test('fromNow', function (assert) {
     assert.equal(moment().add({y: 400}).fromNow(), 'a 400 Joer', 'in 400 years');
 });
 
+test('calendar day', function (assert) {
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Haut um 12:00 Auer',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Haut um 12:25 Auer',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Haut um 13:00 Auer',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Muer um 12:00 Auer',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Haut um 11:00 Auer',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Gëschter um 12:00 Auer', 'yesterday at the same time');
+});
+
+test('calendar next week', function (assert) {
+    var i, m;
+
+    for (i = 2; i < 7; i++) {
+        m = moment().add({d: i});
+        assert.equal(m.calendar(),       m.format('dddd [um] LT'),  'Today + ' + i + ' days current time');
+        m.hours(0).minutes(0).seconds(0).milliseconds(0);
+        assert.equal(m.calendar(),       m.format('dddd [um] LT'),  'Today + ' + i + ' days beginning of day');
+        m.hours(23).minutes(59).seconds(59).milliseconds(999);
+        assert.equal(m.calendar(),       m.format('dddd [um] LT'),  'Today + ' + i + ' days end of day');
+    }
+});
+
 test('calendar last week', function (assert) {
     var i, m, weekday, datestring;
     for (i = 2; i < 7; i++) {
@@ -139,3 +163,24 @@ test('calendar last week', function (assert) {
     }
 });
 
+test('calendar all else', function (assert) {
+    var weeksAgo = moment().subtract({w: 1}),
+        weeksFromNow = moment().add({w: 1});
+
+    assert.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  '1 week ago');
+    assert.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  'in 1 week');
+
+    weeksAgo = moment().subtract({w: 2});
+    weeksFromNow = moment().add({w: 2});
+
+    assert.equal(weeksAgo.calendar(),       weeksAgo.format('L'),  '2 weeks ago');
+    assert.equal(weeksFromNow.calendar(),   weeksFromNow.format('L'),  'in 2 weeks');
+});
+
+test('weeks year starting sunday format', function (assert) {
+    assert.equal(moment([2012, 0,  1]).format('w ww wo'), '52 52 52.', 'Jan  1 2012 should be week 52');
+    assert.equal(moment([2012, 0,  7]).format('w ww wo'), '1 01 1.',   'Jan  7 2012 should be week 1');
+    assert.equal(moment([2012, 0,  8]).format('w ww wo'), '1 01 1.',   'Jan  8 2012 should be week 1');
+    assert.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2.',   'Jan 14 2012 should be week 2');
+    assert.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.',   'Jan 15 2012 should be week 2');
+});
index 81e83ccb55f16acbae63685d878210170f3506e2..9e5f57d381df39e6db7fab31085a8a039b50ddc0 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                   'ມື້ນີ້ເວລາ 02:00',      'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'ມື້ນີ້ເວລາ 02:25',      'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'ມື້ນີ້ເວລາ 03:00',      'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'ມື້ອື່ນເວລາ 02:00',   'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'ມື້ນີ້ເວລາ 01:00',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'ມື້ວານນີ້ເວລາ 02:00',  'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'ມື້ນີ້ເວລາ 12:00',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'ມື້ນີ້ເວລາ 12:25',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'ມື້ນີ້ເວລາ 13:00',    'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'ມື້ອື່ນເວລາ 12:00',   'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'ມື້ນີ້ເວລາ 11:00',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'ມື້ວານນີ້ເວລາ 12:00',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 955727cbf0166c42a29499afab2923a8e673d907..069b90da608d8d54b7f31545c2bee7407285f63e 100644 (file)
@@ -168,14 +168,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Šiandien 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Šiandien 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Šiandien 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Rytoj 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Šiandien 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Vakar 02:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Šiandien 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Šiandien 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Šiandien 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Rytoj 12:00',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Šiandien 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Vakar 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index e38757bf8f1b89e706a2deec9513131a93a389fc..a3ecabd4a519e5aeed70dcfe42fdde1fac4ecede 100644 (file)
@@ -172,14 +172,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Šodien pulksten 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Šodien pulksten 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Šodien pulksten 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Rīt pulksten 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Šodien pulksten 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Vakar pulksten 02:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Šodien pulksten 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Šodien pulksten 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Šodien pulksten 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Rīt pulksten 12:00',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Šodien pulksten 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Vakar pulksten 12:00',   'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 0682dc8cddb14e4131c044a2daebe64b934bc4c8..813d68df3a4a31767607e267c4fb44db077470f6 100644 (file)
@@ -154,14 +154,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                   'danas u 2:00',  'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'danas u 2:25',  'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'danas u 3:00',  'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'sjutra u 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'danas u 1:00',  'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'juče u 2:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'danas u 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'danas u 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'danas u 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'sjutra u 12:00', 'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'danas u 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'juče u 12:00',   'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 9cc6b4bbef639c4c60158706636b38cdab9b03f5..93357bf43443501287ad3a42e8d8b923ccbb8b3b 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                   'Денес во 2:00',  'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Денес во 2:25',  'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Денес во 3:00',  'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Утре во 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Денес во 1:00',  'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Вчера во 2:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Денес во 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Денес во 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Денес во 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Утре во 12:00',   'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Денес во 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Вчера во 12:00',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 2e5b3077353ecd915b1ab2ecd4a8d960fffc48e8..b1588fb663b6b671358aa488317d9ffe73f39b4c 100644 (file)
@@ -150,14 +150,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'ഇന്ന് രാത്രി 2:00 -നു',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'à´\87à´¨àµ\8dà´¨àµ\8d à´°à´¾à´¤àµ\8dà´°à´¿ 2:25 -à´¨àµ\81',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 3}).calendar(),       'à´\87à´¨àµ\8dà´¨àµ\8d à´°à´¾à´µà´¿à´²àµ\86 5:00 -à´¨àµ\81',     'Now plus 3 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'നാളàµ\86 à´°à´¾à´¤àµ\8dà´°à´¿ 2:00 -à´¨àµ\81',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à´\87à´¨àµ\8dà´¨àµ\8d à´°à´¾à´¤àµ\8dà´°à´¿ 1:00 -à´¨àµ\81',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'à´\87à´¨àµ\8dനലàµ\86 à´°à´¾à´¤àµ\8dà´°à´¿ 2:00 -à´¨àµ\81', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'ഇന്ന് ഉച്ച കഴിഞ്ഞ് 12:00 -നു',   'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'à´\87à´¨àµ\8dà´¨àµ\8d à´\89à´\9aàµ\8dà´\9a à´\95à´´à´¿à´\9eàµ\8dà´\9eàµ\8d 12:25 -à´¨àµ\81',   'Now plus 25 min');
+    assert.equal(moment(a).add({h: 3}).calendar(),       'à´\87à´¨àµ\8dà´¨àµ\8d à´\89à´\9aàµ\8dà´\9a à´\95à´´à´¿à´\9eàµ\8dà´\9eàµ\8d 3:00 -à´¨àµ\81',    'Now plus 3 hours');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'നാളàµ\86 à´\89à´\9aàµ\8dà´\9a à´\95à´´à´¿à´\9eàµ\8dà´\9eàµ\8d 12:00 -à´¨àµ\81',    'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à´\87à´¨àµ\8dà´¨àµ\8d à´°à´¾à´µà´¿à´²àµ\86 11:00 -à´¨àµ\81',         'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'à´\87à´¨àµ\8dനലàµ\86 à´\89à´\9aàµ\8dà´\9a à´\95à´´à´¿à´\9eàµ\8dà´\9eàµ\8d 12:00 -à´¨àµ\81',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index b44db552927075675c74b1a4895dc8c506a6b9db..2122b16554f82ae200a497869524e3e6a3d06f1c 100644 (file)
@@ -150,14 +150,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'आज रात्री २:०० वाजता',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'à¤\86à¤\9c à¤°à¤¾à¤¤à¥\8dरà¥\80 à¥¨:२५ à¤µà¤¾à¤\9cता',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 3}).calendar(),       'à¤\86à¤\9c à¤¸à¤\95ाळà¥\80 à¥«:०० à¤µà¤¾à¤\9cता',     'Now plus 3 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'à¤\89दà¥\8dया à¤°à¤¾à¤¤à¥\8dरà¥\80 à¥¨:०० à¤µà¤¾à¤\9cता',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à¤\86à¤\9c à¤°à¤¾à¤¤à¥\8dरà¥\80 à¥§:०० à¤µà¤¾à¤\9cता',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'à¤\95ाल à¤°à¤¾à¤¤à¥\8dरà¥\80 à¥¨:०० à¤µà¤¾à¤\9cता', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'आज दुपारी १२:०० वाजता',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'à¤\86à¤\9c à¤¦à¥\81पारà¥\80 à¥§à¥¨:२५ à¤µà¤¾à¤\9cता',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 3}).calendar(),       'à¤\86à¤\9c à¤¦à¥\81पारà¥\80 à¥©:०० à¤µà¤¾à¤\9cता',     'Now plus 3 hours');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'à¤\89दà¥\8dया à¤¦à¥\81पारà¥\80 à¥§à¥¨:०० à¤µà¤¾à¤\9cता', 'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à¤\86à¤\9c à¤¦à¥\81पारà¥\80 à¥§à¥§:०० à¤µà¤¾à¤\9cता',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'à¤\95ाल à¤¦à¥\81पारà¥\80 à¥§à¥¨:०० à¤µà¤¾à¤\9cता',   'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 79f813a75cfc1d3fbe13cd2d3d7338793bb99512..12576be8aacde63a685ddaed3cd76d0b8ef8a8ca 100644 (file)
@@ -160,14 +160,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Hari ini pukul 02.00',     'hari ini pada waktu yang sama');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Hari ini pukul 02.25',     'Sekarang tambah 25 minit');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Hari ini pukul 03.00',     'Sekarang tambah 1 jam');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Esok pukul 02.00',  'esok pada waktu yang sama');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hari ini pukul 01.00',     'Sekarang tolak 1 jam');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Kelmarin pukul 02.00', 'kelmarin pada waktu yang sama');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Hari ini pukul 12.00',  'hari ini pada waktu yang sama');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Hari ini pukul 12.25',  'Sekarang tambah 25 minit');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Hari ini pukul 13.00',  'Sekarang tambah 1 jam');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Esok pukul 12.00',      'esok pada waktu yang sama');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hari ini pukul 11.00',  'Sekarang tolak 1 jam');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Kelmarin pukul 12.00',  'kelmarin pada waktu yang sama');
 });
 
 test('calendar next week', function (assert) {
index fdbe204f1cc93b50568d7abd220ffd904064bab6..ed5f588b0ef86be2042a4fc7f93abc200b3d1703 100644 (file)
@@ -160,14 +160,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Hari ini pukul 02.00',     'hari ini pada waktu yang sama');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Hari ini pukul 02.25',     'Sekarang tambah 25 minit');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Hari ini pukul 03.00',     'Sekarang tambah 1 jam');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Esok pukul 02.00',  'esok pada waktu yang sama');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hari ini pukul 01.00',     'Sekarang tolak 1 jam');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Kelmarin pukul 02.00', 'kelmarin pada waktu yang sama');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Hari ini pukul 12.00',  'hari ini pada waktu yang sama');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Hari ini pukul 12.25',  'Sekarang tambah 25 minit');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Hari ini pukul 13.00',  'Sekarang tambah 1 jam');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Esok pukul 12.00',      'esok pada waktu yang sama');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hari ini pukul 11.00',  'Sekarang tolak 1 jam');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Kelmarin pukul 12.00',  'kelmarin pada waktu yang sama');
 });
 
 test('calendar next week', function (assert) {
index 604ae6efdb84de812db724475ad341fffddac4de..64f40bc25312c511b4ed231a065273e4835841b7 100644 (file)
@@ -216,24 +216,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
+    var a = moment().hours(12).minutes(0).seconds(0);
 
-    assert.equal(moment(a).calendar(), 'ယနေ. ၀၂:၀၀ မှာ', 'ယနေ. ဒီအချိန်');
-    assert.equal(moment(a).add({
-        m: 25
-    }).calendar(), 'ယနေ. ၀၂:၂၅ မှာ', 'ယခုမှ ၂၅ မိနစ်ပေါင်းထည့်');
-    assert.equal(moment(a).add({
-        h: 1
-    }).calendar(), 'ယနေ. ၀၃:၀၀ မှာ', 'ယခုမှ ၁ နာရီပေါင်းထည့်');
-    assert.equal(moment(a).add({
-        d: 1
-    }).calendar(), 'မနက်ဖြန် ၀၂:၀၀ မှာ', 'မနက်ဖြန် ဒီအချိန်');
-    assert.equal(moment(a).subtract({
-        h: 1
-    }).calendar(), 'ယနေ. ၀၁:၀၀ မှာ', 'ယခုမှ ၁ နာရီနှုတ်');
-    assert.equal(moment(a).subtract({
-        d: 1
-    }).calendar(), 'မနေ.က ၀၂:၀၀ မှာ', 'မနေ.က ဒီအချိန်');
+    assert.equal(moment(a).calendar(),                  'ယနေ. ၁၂:၀၀ မှာ',      'ယနေ. ဒီအချိန်');
+    assert.equal(moment(a).add({m: 25}).calendar(),     'ယနေ. ၁၂:၂၅ မှာ',      'ယခုမှ ၂၅ မိနစ်ပေါင်းထည့်');
+    assert.equal(moment(a).add({h: 1}).calendar(),      'ယနေ. ၁၃:၀၀ မှာ',      'ယခုမှ ၁ နာရီပေါင်းထည့်');
+    assert.equal(moment(a).add({d: 1}).calendar(),      'မနက်ဖြန် ၁၂:၀၀ မှာ',  'မနက်ဖြန် ဒီအချိန်');
+    assert.equal(moment(a).subtract({h: 1}).calendar(), 'ယနေ. ၁၁:၀၀ မှာ',      'ယခုမှ ၁ နာရီနှုတ်');
+    assert.equal(moment(a).subtract({d: 1}).calendar(), 'မနေ.က ၁၂:၀၀ မှာ',     'မနေ.က ဒီအချိန်');
 });
 
 test('calendar next week', function (assert) {
index 51ce8a088af4b9d4ede7b57a8268a5ce3ca4bf1d..6290b81745d3fa591b9730f64c1f7352416e2c9d 100644 (file)
@@ -152,14 +152,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'i dag kl. 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'i dag kl. 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'i dag kl. 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'i morgen kl. 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'i dag kl. 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'i går kl. 02:00',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'i dag kl. 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'i dag kl. 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'i dag kl. 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'i morgen kl. 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'i dag kl. 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'i går kl. 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 14079ee4b6424496563e63168c081590c0f3ecd6..8f61e19caf05ccfe123cf90526112195b1c3f594 100644 (file)
@@ -150,14 +150,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                   'à¤\86à¤\9c à¤°à¤¾à¤¤à¤¿à¤\95à¥\8b à¥¨:०० à¤¬à¤\9cà¥\87',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'à¤\86à¤\9c à¤°à¤¾à¤¤à¤¿à¤\95à¥\8b à¥¨:२५ à¤¬à¤\9cà¥\87',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'à¤\86à¤\9c à¤¬à¤¿à¤¹à¤¾à¤¨à¤\95à¥\8b à¥©:०० बजे',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'भà¥\8bलि à¤°à¤¾à¤¤à¤¿à¤\95à¥\8b २:०० बजे',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à¤\86à¤\9c à¤°à¤¾à¤¤à¤¿à¤\95à¥\8b १:०० बजे',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'हिà¤\9cà¥\8b à¤°à¤¾à¤¤à¤¿à¤\95à¥\8b à¥¨:०० à¤¬à¤\9cà¥\87', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'à¤\86à¤\9c à¤¦à¤¿à¤\89à¤\81सà¥\8bà¤\95à¥\8b à¥§à¥¨:०० à¤¬à¤\9cà¥\87',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'à¤\86à¤\9c à¤¦à¤¿à¤\89à¤\81सà¥\8bà¤\95à¥\8b à¥§à¥¨:२५ à¤¬à¤\9cà¥\87',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'à¤\86à¤\9c à¤¦à¤¿à¤\89à¤\81सà¥\8bà¤\95à¥\8b à¥§:०० बजे',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'भà¥\8bलि à¤¦à¤¿à¤\89à¤\81सà¥\8bà¤\95à¥\8b à¥§२:०० बजे',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à¤\86à¤\9c à¤¬à¤¿à¤¹à¤¾à¤¨à¤\95à¥\8b à¥§१:०० बजे',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'हिà¤\9cà¥\8b à¤¦à¤¿à¤\89à¤\81सà¥\8bà¤\95à¥\8b à¥§à¥¨:०० à¤¬à¤\9cà¥\87',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 4c283e36384c95117c2970ef04550ff5fce54ce4..d0f7533d61381366ec08f44ed8dcef075b07499b 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'vandaag om 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'vandaag om 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'vandaag om 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'morgen om 02:00',    'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'vandaag om 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'gisteren om 02:00',   'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'vandaag om 12:00',   'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'vandaag om 12:25',   'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'vandaag om 13:00',   'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'morgen om 12:00',    'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'vandaag om 11:00',   'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'gisteren om 12:00',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 17d50de1010738dcbbe23cc8c4405fc19802ba4e..637df4056013332a3a83e750a85670f19b5e213e 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'I dag klokka 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'I dag klokka 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'I dag klokka 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'I morgon klokka 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'I dag klokka 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'I går klokka 02:00',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'I dag klokka 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'I dag klokka 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'I dag klokka 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'I morgon klokka 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'I dag klokka 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'I går klokka 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 074b7e2d1970e7e7fc75c6fcec2676eeefaa26ff..73f45a96e891c06a70aaa99e233d7eeddf56e365 100644 (file)
@@ -150,14 +150,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'ਅਜ ਰਾਤ ੨:੦੦ ਵਜੇ',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'à¨\85à¨\9c à¨°à¨¾à¨¤ à©¨:੨੫ à¨µà¨\9cà©\87',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 3}).calendar(),       'à¨\85à¨\9c à¨¸à¨µà©\87ਰ à©«:੦੦ à¨µà¨\9cà©\87',     'Now plus 3 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'à¨\95ਲ à¨°à¨¾à¨¤ ੨:੦੦ ਵਜੇ',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à¨\85à¨\9c à¨°à¨¾à¨¤ à©§:੦੦ à¨µà¨\9cà©\87',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'à¨\95ਲ à¨°à¨¾à¨¤ à©¨:੦੦ à¨µà¨\9cà©\87', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'ਅਜ ਦੁਪਹਿਰ ੧੨:੦੦ ਵਜੇ',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'à¨\85à¨\9c à¨¦à©\81ਪਹਿਰ à©§à©¨:੨੫ à¨µà¨\9cà©\87',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 3}).calendar(),       'à¨\85à¨\9c à¨¦à©\81ਪਹਿਰ à©©:੦੦ à¨µà¨\9cà©\87',   'Now plus 3 hours');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'à¨\95ਲ à¨¦à©\81ਪਹਿਰ à©§੨:੦੦ ਵਜੇ',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à¨\85à¨\9c à¨¦à©\81ਪਹਿਰ à©§à©§:੦੦ à¨µà¨\9cà©\87',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'à¨\95ਲ à¨¦à©\81ਪਹਿਰ à©§à©¨:੦੦ à¨µà¨\9cà©\87',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index ff1ac861c183550ce1481241bdf3b007cf3c9573..e35d0a6f19e14306f95d0505fa8942707bf0c928 100644 (file)
@@ -179,14 +179,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Dziś o 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Dziś o 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Dziś o 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Jutro o 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Dziś o 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Wczoraj o 02:00',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Dziś o 12:00',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Dziś o 12:25',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Dziś o 13:00',    'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Jutro o 12:00',   'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Dziś o 11:00',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Wczoraj o 12:00', 'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index ecf6e2d24010d6feccc83231b66ec79510c611af..2ac42634886b4cb96d2ee59cd435496ad3d55e7f 100644 (file)
@@ -149,14 +149,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Hoje às 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Hoje às 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Hoje às 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Amanhã às 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hoje às 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ontem às 02:00',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Hoje às 12:00',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Hoje às 12:25',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Hoje às 13:00',    'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Amanhã às 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hoje às 11:00',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ontem às 12:00',   'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 2f5a8c9b5922aa6c309c9bdd03c429033efe4136..3235acc1881739a143b971c102821427906152d3 100644 (file)
@@ -147,14 +147,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Hoje às 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Hoje às 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Hoje às 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Amanhã às 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hoje às 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ontem às 02:00',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Hoje às 12:00',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Hoje às 12:25',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Hoje às 13:00',    'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Amanhã às 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hoje às 11:00',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Ontem às 12:00',   'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index ba66d62bdf03a2dcc8df7bbf33f73a590efff5f8..1713d376e3282d55b03cf7ffe9a025c8db32e96f 100644 (file)
@@ -159,14 +159,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'azi la 2:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'azi la 2:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'azi la 3:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'mâine la 2:00',   'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'azi la 1:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'ieri la 2:00',    'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'azi la 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'azi la 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'azi la 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'mâine la 12:00',   'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'azi la 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'ieri la 12:00',    'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 9b28af4e8c9c8f41f6d1ce3802f3532741561390..ebc4965a27e3acfc064c3564612101d4a6e4ab4d 100644 (file)
@@ -225,14 +225,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Сегодня в 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Сегодня в 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Сегодня в 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Завтра в 02:00',      'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Сегодня в 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Вчера в 02:00',       'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Сегодня в 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Сегодня в 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Сегодня в 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Завтра в 12:00',      'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Сегодня в 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Вчера в 12:00',       'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 53f1e225602fe2d394369cfeff4fa4580d1e1a53..d0f0534a220743e5b1b528986cceae08c207d1a0 100644 (file)
@@ -160,14 +160,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                   'otne ti 02:00',     'Today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'otne ti 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'otne ti 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'ihttin ti 02:00',   'Tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'otne ti 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'ikte ti 02:00',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'otne ti 12:00',     'Today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'otne ti 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'otne ti 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'ihttin ti 12:00',   'Tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'otne ti 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'ikte ti 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index bcbdeb2d062fde28f7636e748485cc45be7768f3..4b03324592cdce2b2068da2dde25aadc2b131a98 100644 (file)
@@ -153,14 +153,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                   'අද පෙ.ව. 2:00ට',      'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'අද පෙ.ව. 2:25ට',      'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'අද පෙ.ව. 3:00ට',      'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'හෙට පෙ.ව. 2:00ට',   'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'අද පෙ.ව. 1:00ට',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'ඊයේ පෙ.ව. 2:00ට',  'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'අද ප.ව. 12:00ට',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'අද ප.ව. 12:25ට',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'අද ප.ව. 1:00ට',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'හෙට ප.ව. 12:00ට',   'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'අද පෙ.ව. 11:00ට',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'ඊයේ ප.ව. 12:00ට',   'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index d49f12fd7f237c6c0b7d1552da7433d271e15e39..eda37340ddab467772c0161ef4cf253f7053fda5 100644 (file)
@@ -184,14 +184,14 @@ test('fromNow (past)', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
+    var a = moment().hours(12).minutes(0).seconds(0);
 
-    assert.equal(moment(a).calendar(),                     'dnes o 2:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'dnes o 2:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'dnes o 3:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'zajtra o 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'dnes o 1:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'včera o 2:00',     'yesterday at the same time');
+    assert.equal(moment(a).calendar(),                   'dnes o 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'dnes o 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'dnes o 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'zajtra o 12:00',   'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'dnes o 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'včera o 12:00',    'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 91b1f8d0310e6d12c750c870223ca5698014c64c..70b868f19f8ce533cf598f6326496aa1f7645d12 100644 (file)
@@ -241,14 +241,14 @@ test('fromNow (future)', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'danes ob 2:00',  'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'danes ob 2:25',  'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'danes ob 3:00',  'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'jutri ob 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'danes ob 1:00',  'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'včeraj ob 2:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'danes ob 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'danes ob 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'danes ob 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'jutri ob 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'danes ob 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'včeraj ob 12:00', 'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index fd55d52dc41e1e54f5706fdc9807eb2cf098b7d6..37bf74bdf7646d7ae8387b5a588b425373c94681 100644 (file)
@@ -165,14 +165,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Sot në 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Sot në 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Sot në 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Nesër në 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Sot në 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Dje në 02:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Sot në 12:00',   'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Sot në 12:25',   'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Sot në 13:00',   'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Nesër në 12:00', 'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Sot në 11:00',   'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Dje në 12:00',   'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index e14d05c1a57bd2bbb52de41be89a77344d87af20..0dff56adaa6eff3dec828be2b439f19adf9af738 100644 (file)
@@ -154,14 +154,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'данас у 2:00',  'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'данас у 2:25',  'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'данас у 3:00',  'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'сутра у 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'данас у 1:00',  'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'јуче у 2:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'данас у 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'данас у 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'данас у 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'сутра у 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'данас у 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'јуче у 12:00',   'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index ebf0e17a0448b6060cf7676bb48a13613ba6bef2..94650a4026b128a79010ded14eb6c4bc12a7abf9 100644 (file)
@@ -154,14 +154,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'danas u 2:00',  'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'danas u 2:25',  'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'danas u 3:00',  'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'sutra u 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'danas u 1:00',  'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'juče u 2:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'danas u 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'danas u 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'danas u 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'sutra u 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'danas u 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'juče u 12:00',   'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 17f2a19360fc8b467e89a222e5dd8747926bc65a..74b86c543f6c328dd8006408e2d352535c0f3a72 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Idag 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Idag 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Idag 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Imorgon 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Idag 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Igår 02:00',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Idag 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Idag 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Idag 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Imorgon 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Idag 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Igår 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index cbd6537da3bc1fe0c5521b70c092f6b99b7b2b0e..c39fb71cc8d785ccf0ec8fe7684f753d08173558 100644 (file)
@@ -151,13 +151,13 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-    assert.equal(moment(a).calendar(),                   'leo saa 02:00',      'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'leo saa 02:25',      'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'leo saa 03:00',      'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'kesho saa 02:00',    'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'leo saa 01:00',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'jana 02:00',         'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+    assert.equal(moment(a).calendar(),                   'leo saa 12:00',      'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'leo saa 12:25',      'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'leo saa 13:00',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'kesho saa 12:00',    'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'leo saa 11:00',      'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'jana 12:00',         'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index e5889a602b2c2d88b100ef47c32250882e039c7c..305457a5ece4ad708d9c796ee2f4509b06e95ccc 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),  'இன்று ௦௨:௦௦', 'இன்று  02:00');
-    assert.equal(moment(a).add({m: 25}).calendar(), 'இன்று ௦௨:௨௫', 'இன்று  02:25');
-    assert.equal(moment(a).add({h: 1}).calendar(), 'இன்று ௦௩:௦௦', 'இன்று  03:00');
-    assert.equal(moment(a).add({d: 1}).calendar(), 'நாளை ௦௨:௦௦', 'நாளை  02:00');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à®\87னà¯\8dà®±à¯\81 à¯¦à¯§:௦௦',      'à®\87னà¯\8dà®±à¯\81  0௧:00');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'நà¯\87à®±à¯\8dà®±à¯\81 à¯¦à¯¨:௦௦',  'நà¯\87à®±à¯\8dà®±à¯\81  02:00');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'இன்று ௧௨:௦௦',   'இன்று  12:00');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'இன்று ௧௨:௨௫',   'இன்று  12:25');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'இன்று ௧௩:௦௦',   'இன்று  13:00');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'நாளை ௧௨:௦௦',    'நாளை  12:00');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à®\87னà¯\8dà®±à¯\81 à¯§à¯§:௦௦',   'à®\87னà¯\8dà®±à¯\81  11:00');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'நà¯\87à®±à¯\8dà®±à¯\81 à¯§à¯¨:௦௦',  'நà¯\87à®±à¯\8dà®±à¯\81  12:00');
 });
 
 test('calendar next week', function (assert) {
index 1360e88978f48327d7ece25062746142a6c52574..59f6352ce7aa188ede37e2555d5b8132689210d7 100644 (file)
@@ -150,14 +150,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'నేడు రాత్రి 2:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'à°¨à±\87à°¡à±\81 à°°à°¾à°¤à±\8dà°°à°¿ 2:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 3}).calendar(),       'à°¨à±\87à°¡à±\81 à°\89దయà°\82 5:00',     'Now plus 3 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'à°°à±\87à°ªà±\81 à°°à°¾à°¤à±\8dà°°à°¿ 2:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à°¨à±\87à°¡à±\81 à°°à°¾à°¤à±\8dà°°à°¿ 1:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'నినà±\8dà°¨ à°°à°¾à°¤à±\8dà°°à°¿ 2:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'నేడు మధ్యాహ్నం 12:00',   'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'à°¨à±\87à°¡à±\81 à°®à°§à±\8dయాహà±\8dà°¨à°\82 12:25',   'Now plus 25 min');
+    assert.equal(moment(a).add({h: 3}).calendar(),       'à°¨à±\87à°¡à±\81 à°®à°§à±\8dయాహà±\8dà°¨à°\82 3:00',    'Now plus 3 hours');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'à°°à±\87à°ªà±\81 à°®à°§à±\8dయాహà±\8dà°¨à°\82 12:00',   'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'à°¨à±\87à°¡à±\81 à°®à°§à±\8dయాహà±\8dà°¨à°\82 11:00',   'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'నినà±\8dà°¨ à°®à°§à±\8dయాహà±\8dà°¨à°\82 12:00',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 5201a7eabec786bf90805a3777a18766252dada0..885f8c0e3886e7f8dd68851ba4b4080bddc33691 100644 (file)
@@ -114,14 +114,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'วันนี้ เวลา 2 นาฬิกา 0 นาที',      'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'วันนี้ เวลา 2 นาฬิกา 25 นาที',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'วันนี้ เวลา 3 นาฬิกา 0 นาที',      'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'พรุ่งนี้ เวลา 2 นาฬิกา 0 นาที', 'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'วันนี้ เวลา 1 นาฬิกา 0 นาที',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'เมื่อวานนี้ เวลา 2 นาฬิกา 0 นาที', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'วันนี้ เวลา 12 นาฬิกา 0 นาที',      'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'วันนี้ เวลา 12 นาฬิกา 25 นาที',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'วันนี้ เวลา 13 นาฬิกา 0 นาที',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'พรุ่งนี้ เวลา 12 นาฬิกา 0 นาที',    'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'วันนี้ เวลา 11 นาฬิกา 0 นาที',      'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'เมื่อวานนี้ เวลา 12 นาฬิกา 0 นาที', 'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 0efda344878347930c925a460b4c30807eed661a..97e56c318857570a6739280528415edd3256bd0f 100644 (file)
@@ -148,14 +148,14 @@ test('fromNow', function (assert) {
 });
 
 test('same day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Ngayon sa 02:00',    'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Ngayon sa 02:25',    'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Ngayon sa 03:00',    'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Bukas sa 02:00',     'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Ngayon sa 01:00',    'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Kahapon sa 02:00',   'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Ngayon sa 12:00',    'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Ngayon sa 12:25',    'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Ngayon sa 13:00',    'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Bukas sa 12:00',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Ngayon sa 11:00',    'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Kahapon sa 12:00',   'yesterday at the same time');
 });
 
 test('same next week', function (assert) {
index f6c2a57f38b854a8dba81b00b438cfeef03b72d0..35ca6c043eeccfacf91b523edf894920352db03e 100644 (file)
@@ -165,14 +165,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                   'DaHjaj 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'DaHjaj 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'DaHjaj 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'wa’leS 02:00',     'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'DaHjaj 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'wa’Hu’ 02:00',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'DaHjaj 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'DaHjaj 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'DaHjaj 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'wa’leS 12:00',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'DaHjaj 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'wa’Hu’ 12:00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 8d29a999589981e1381e76e5b6cacb0e6910992c..e16c3bcea941d8201fc642a68ad27869cf873fa3 100644 (file)
@@ -162,14 +162,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'bugün saat 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'bugün saat 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'bugün saat 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'yarın saat 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'bugün saat 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'dün 02:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'bugün saat 12:00',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'bugün saat 12:25',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'bugün saat 13:00',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'yarın saat 12:00',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'bugün saat 11:00',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'dün 12:00',            'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index 18427a9609ebdf3eb38292007496887ab6306719..2b0412c02ec3f201761b8b3c39389198af985b53 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'oxhi à 02.00',      'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'oxhi à 02.25',      'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'oxhi à 03.00',      'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'demà à 02.00',   'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'oxhi à 01.00',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'ieiri à 02.00',  'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'oxhi à 12.00',      'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'oxhi à 12.25',      'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'oxhi à 13.00',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'demà à 12.00',      'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'oxhi à 11.00',      'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'ieiri à 12.00',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index fd358955c0e9cc9e575e4b746c008893f8d12474..2131427cf146d5e73db62b8c6c79c814e21abf82 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'asdkh g 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'asdkh g 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'asdkh g 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'aska g 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'asdkh g 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'assant g 02:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'asdkh g 12:00',   'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'asdkh g 12:25',   'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'asdkh g 13:00',   'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'aska g 12:00',    'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'asdkh g 11:00',   'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'assant g 12:00',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index d5e4e264955930f60ea0e07ea548e4aa7d766f0a..ea7df54ca1b450b2abd660509a2fcff2280923b3 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'ⴰⵙⴷⵅ ⴴ 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'ⴰⵙⴷⵅ ⴴ 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'ⴰⵙⴷⵅ ⴴ 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'ⴰⵙⴽⴰ ⴴ 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'ⴰⵙⴷⵅ ⴴ 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'ⴰⵚⴰⵏⵜ ⴴ 02:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'ⴰⵙⴷⵅ ⴴ 12:00',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'ⴰⵙⴷⵅ ⴴ 12:25',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'ⴰⵙⴷⵅ ⴴ 13:00',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'ⴰⵙⴽⴰ ⴴ 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'ⴰⵙⴷⵅ ⴴ 11:00',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'ⴰⵚⴰⵏⵜ ⴴ 12:00',  'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index a2a2f22d062b3c1fa3f2a5cb14785005b29355b8..326c58a1ded1c44dc48abc239d73d97634d5d5e9 100644 (file)
@@ -167,16 +167,16 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Сьогодні о 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Сьогодні о 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Сьогодні о 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Завтра о 02:00',      'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Сьогодні о 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Вчора о 02:00',       'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Сьогодні о 12:00',   'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Сьогодні о 12:25',   'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Сьогодні о 13:00',   'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Завтра о 12:00',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 2}).calendar(),  'Сьогодні о 10:00',   'Now minus 2 hours');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Вчора о 12:00',      'yesterday at the same time');
     // A special case for Ukrainian since 11 hours have different preposition
-    assert.equal(moment(a).add({h: 9}).calendar(),  'Сьогодні об 11:00',       'same day at 11 o\'clock');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Сьогодні об 11:00',  'same day at 11 o\'clock');
 });
 
 test('calendar next week', function (assert) {
index d9cafa1899604e74e3de800a1263e03b3b5742f7..fbf81386d3b12e470fa4c9f96b1425d41b2f37c7 100644 (file)
@@ -151,14 +151,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                   'Бугун соат 02:00 да',      'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Бугун соат 02:25 да',      'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Бугун соат 03:00 да',      'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Эртага 02:00 да',   'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Бугун соат 01:00 да',      'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Кеча соат 02:00 да',  'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Бугун соат 12:00 да',  'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Бугун соат 12:25 да',  'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Бугун соат 13:00 да',  'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Эртага 12:00 да',      'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Бугун соат 11:00 да',  'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Кеча соат 12:00 да',   'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index baeecdd8754ecf9200860ff01708954fe7ddfca2..c1893dbceea01b07c1f7e1e34eb06ed0a98ba0dd 100644 (file)
@@ -160,14 +160,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                     'Hôm nay lúc 02:00',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      'Hôm nay lúc 02:25',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       'Hôm nay lúc 03:00',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       'Ngày mai lúc 02:00',  'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hôm nay lúc 01:00',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Hôm qua lúc 02:00', 'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   'Hôm nay lúc 12:00',   'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      'Hôm nay lúc 12:25',   'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       'Hôm nay lúc 13:00',   'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       'Ngày mai lúc 12:00',  'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  'Hôm nay lúc 11:00',   'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  'Hôm qua lúc 12:00',   'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {
index c49213ada4a16498173d4417dd13c0d85daa5a85..86a66219dbe5d7274593e969012790af0a75267c 100644 (file)
@@ -119,14 +119,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                   '今天凌晨2点整',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      '今天凌晨2点25分',   'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       '今天凌晨3点整',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       '明天凌晨2点整',     'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  '今天凌晨1点整',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  '昨天凌晨2点整',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   '今天中午12点整',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      '今天中午12点25分',   'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       '今天下午1点整',      'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       '明天中午12点整',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  '今天上午11点整',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  '昨天中午12点整',     'yesterday at the same time');
 });
 
 test('calendar current week', function (assert) {
index 17a4dfb7fada438e348e6552f2a9c20c2a4eb868..13703da06fe3f8bf3006332f711ace2ba794cc18 100644 (file)
@@ -117,14 +117,14 @@ test('fromNow', function (assert) {
 });
 
 test('calendar day', function (assert) {
-    var a = moment().hours(2).minutes(0).seconds(0);
-
-    assert.equal(moment(a).calendar(),                   '今天早上2點00分',     'today at the same time');
-    assert.equal(moment(a).add({m: 25}).calendar(),      '今天早上2點25分',     'Now plus 25 min');
-    assert.equal(moment(a).add({h: 1}).calendar(),       '今天早上3點00分',     'Now plus 1 hour');
-    assert.equal(moment(a).add({d: 1}).calendar(),       '明天早上2點00分',     'tomorrow at the same time');
-    assert.equal(moment(a).subtract({h: 1}).calendar(),  '今天早上1點00分',     'Now minus 1 hour');
-    assert.equal(moment(a).subtract({d: 1}).calendar(),  '昨天早上2點00分',     'yesterday at the same time');
+    var a = moment().hours(12).minutes(0).seconds(0);
+
+    assert.equal(moment(a).calendar(),                   '今天中午12點00分',     'today at the same time');
+    assert.equal(moment(a).add({m: 25}).calendar(),      '今天中午12點25分',     'Now plus 25 min');
+    assert.equal(moment(a).add({h: 1}).calendar(),       '今天下午1點00分',     'Now plus 1 hour');
+    assert.equal(moment(a).add({d: 1}).calendar(),       '明天中午12點00分',     'tomorrow at the same time');
+    assert.equal(moment(a).subtract({h: 1}).calendar(),  '今天上午11點00分',     'Now minus 1 hour');
+    assert.equal(moment(a).subtract({d: 1}).calendar(),  '昨天中午12點00分',     'yesterday at the same time');
 });
 
 test('calendar next week', function (assert) {