// moment.js language configuration
// language : danish (da)
// author : Ulrik Nielsen : https://github.com/mrbase
- (function () {
- var lang = {
- months : "Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),
- monthsShort : "Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),
- weekdays : "Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),
- weekdaysShort : "Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),
- weekdaysMin : "Sø_Ma_Ti_On_To_Fr_Lø".split("_"),
- longDateFormat : {
- LT : "HH:mm",
- L : "DD/MM/YYYY",
- LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY LT",
- LLLL : "dddd D. MMMM, YYYY LT"
- },
- 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',
- sameElse : 'L'
- },
- relativeTime : {
- future : "om %s",
- past : "%s siden",
- s : "få sekunder",
- m : "et minut",
- mm : "%d minutter",
- h : "en time",
- hh : "%d timer",
- d : "en dag",
- dd : "%d dage",
- M : "en måned",
- MM : "%d måneder",
- y : "et år",
- yy : "%d år"
- },
- ordinal : function (number) {
- return '.';
- }
- };
- // Node
- if (typeof module !== 'undefined' && module.exports) {
- module.exports = lang;
+ require('../moment').lang('da', {
+ months : "Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),
+ monthsShort : "Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),
+ weekdays : "Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),
+ weekdaysShort : "Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),
+ weekdaysMin : "Sø_Ma_Ti_On_To_Fr_Lø".split("_"),
+ longDateFormat : {
- LT : "h:mm A",
++ LT : "HH:mm",
+ L : "DD/MM/YYYY",
+ LL : "D MMMM YYYY",
- LLL : "D MMMM YYYY h:mm A",
- LLLL : "dddd D. MMMM, YYYY h:mm A"
++ LLL : "D MMMM YYYY LT",
++ LLLL : "dddd D. MMMM, YYYY LT"
+ },
+ 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',
+ sameElse : 'L'
+ },
+ relativeTime : {
+ future : "om %s",
+ past : "%s siden",
+ s : "få sekunder",
- m : "minut",
++ m : "et minut",
+ mm : "%d minutter",
- h : "time",
++ h : "en time",
+ hh : "%d timer",
- d : "dag",
++ d : "en dag",
+ dd : "%d dage",
- M : "månede",
++ M : "en måned",
+ MM : "%d måneder",
- y : "år",
++ y : "et år",
+ yy : "%d år"
+ },
+ ordinal : '%d.',
+ week : {
+ dow : 1, // Monday is the first day of the week.
+ doy : 4 // The week that contains Jan 4th is the first week of the year.
}
- // Browser
- if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
- this.moment.lang('da', lang);
- }
- }());
+ });
- [Moment.js](http://momentjs.com)
- ================================
-
A lightweight javascript date library for parsing, validating, manipulating, and formatting dates.
- ### [Check out the website](http://momentjs.com)
+ # [Documentation](http://momentjs.com/docs/)
+
+ Upgrading to 2.0.0
+ ==================
+
+ There are a number of small backwards incompatible changes with version 2.0.0.
+
+ [See them and their descriptions here](https://gist.github.com/timrwood/e72f2eef320ed9e37c51#backwards-incompatible-changes)
+
+ Changed language ordinal method to return the number + ordinal instead of just the ordinal.
+
+ Changed two digit year parsing cutoff to match strptime.
+
+ Removed `moment#sod` and `moment#eod` in favor of `moment#startOf` and `moment#endOf`.
- ### [Read the documentation](http://momentjs.com/docs/)
+ Removed `moment.humanizeDuration()` in favor of `moment.duration().humanize()`.
- ### [Run the unit tests](http://momentjs.com/test/)
+ Removed the lang data objects from the top level namespace.
+
+ Duplicate `Date` passed to `moment()` instead of referencing it.
+Travis Build Status
+===================
+
+Develop [](https://travis-ci.org/timrwood/moment)
+
+Master [](https://travis-ci.org/timrwood/moment)
Upgrading to 1.6.0
==================
},
"format" : function(test) {
- test.expect(18);
- moment.lang('da');
+ test.expect(22);
var a = [
- ['dddd \\den MMMM Do YYYY, h:mm:ss a', 'Søndag den Februar 14. 2010, 3:25:50 pm'],
+ ['dddd \\den Do MMMM YYYY, h:mm:ss a', 'Søndag den 14. Februar 2010, 3:25:50 pm'],
['ddd hA', 'Søn 3PM'],
['M Mo MM MMMM MMM', '2 2. 02 Februar Feb'],
['YYYY YY', '2010 10'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
- ['[den] DDDo \\d\\ag på året', 'den 45. dag på året'],
+ ['[den] DDDo \\d\\ag på året', 'den 45. dag på året'],
['L', '14/02/2010'],
['LL', '14 Februar 2010'],
- ['LLL', '14 Februar 2010 3:25 PM'],
- ['LLLL', 'Søndag 14. Februar, 2010 3:25 PM'],
+ ['LLL', '14 Februar 2010 15:25'],
- ['LLLL', 'Søndag 14. Februar, 2010 15:25']
++ ['LLLL', 'Søndag 14. Februar, 2010 15:25'],
+ ['l', '14/2/2010'],
+ ['ll', '14 Feb 2010'],
- ['lll', '14 Feb 2010 3:25 PM'],
- ['llll', 'Søn 14. Feb, 2010 3:25 PM']
++ ['lll', '14 Feb 2010 15:25'],
++ ['llll', 'Søn 14. Feb, 2010 15:25']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
"from" : function(test) {
test.expect(30);
- moment.lang('da');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "få sekunder", "44 seconds = a few seconds");
- test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minut", "45 seconds = a minute");
- test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minut", "89 seconds = a minute");
+ test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "et minut", "45 seconds = a minute");
+ test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "et minut", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutter", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutter", "44 minutes = 44 minutes");
- test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "time", "45 minutes = an hour");
- test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "time", "89 minutes = an hour");
+ test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "en time", "45 minutes = an hour");
+ test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "en time", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 timer", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 timer", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 timer", "21 hours = 21 hours");