L : 'DD/MM/YYYY',
LL : 'D. MMMM YYYY',
LLL : 'D. MMMM YYYY HH:mm',
- LLLL : 'dddd [d.] D. MMMM YYYY HH:mm'
+ LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
},
calendar : {
- sameDay : '[I dag kl.] LT',
- nextDay : '[I morgen kl.] LT',
- nextWeek : 'dddd [kl.] LT',
- lastDay : '[I går kl.] LT',
- lastWeek : '[sidste] dddd [kl] LT',
+ sameDay : '[i dag kl.] LT',
+ nextDay : '[i morgen kl.] LT',
+ nextWeek : 'på dddd [kl.] LT',
+ lastDay : '[i går kl.] LT',
+ lastWeek : '[i] dddd[s kl.] LT',
sameElse : 'L'
},
relativeTime : {
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
-
['L', '14/02/2010'],
['LL', '14. februar 2010'],
['LLL', '14. februar 2010 15:25'],
- ['LLLL', 'søndag d. 14. februar 2010 15:25'],
+ ['LLLL', 'søndag d. 14. februar 2010 kl. 15:25'],
['l', '14/2/2010'],
['ll', '14. feb 2010'],
['lll', '14. feb 2010 15:25'],
- ['llll', 'søn d. 14. feb 2010 15:25']
+ ['llll', 'søn d. 14. feb 2010 kl. 15:25']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
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');
+ 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) {
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');
+ assert.equal(m.calendar(), m.format('på 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');
+ assert.equal(m.calendar(), m.format('på 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');
+ assert.equal(m.calendar(), m.format('på dddd [kl.] LT'), 'Today + ' + i + ' days end of day');
}
});
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');
+ assert.equal(m.calendar(), m.format('[i] dddd[s 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');
+ assert.equal(m.calendar(), m.format('[i] dddd[s 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');
+ assert.equal(m.calendar(), m.format('[i] dddd[s kl.] LT'), 'Today - ' + i + ' days end of day');
}
});
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'), '2 02 2.', 'Jan 15 2012 should be week 2');
});
-