});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
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) {
});
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) {
});
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) {
});
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) {
});
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) {
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++) {
}
});
-test('same last week', function (assert) {
+test('calendar last week', function (assert) {
var i, m;
for (i = 2; i < 7; i++) {
}
});
-test('same all else', function (assert) {
+test('calendar all else', function (assert) {
var weeksAgo = moment().subtract({w: 1}),
weeksFromNow = moment().add({w: 1});
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');
});
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) {
});
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) {
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');
+});
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
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');
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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\8d2æ\99\8225å\88\86', 'Now plus 25 min');
- assert.equal(moment(a).add({h: 1}).calendar(), 'ä»\8aæ\97¥ å\8d\88å\89\8d3æ\99\820å\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å¾\8c1æ\99\820å\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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
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++) {
}
});
+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');
+});
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {
});
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) {