2016-02-05 15:42:48 -05:00
|
|
|
//! moment.js locale configuration
|
2020-11-10 20:34:26 -05:00
|
|
|
//! locale : Luxembourgish [lb]
|
|
|
|
//! author : mweimerskirch : https://github.com/mweimerskirch
|
|
|
|
//! author : David Raison : https://github.com/kwisatz
|
2016-02-05 15:42:48 -05:00
|
|
|
|
|
|
|
;(function (global, factory) {
|
|
|
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
|
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
2017-04-20 00:24:20 -04:00
|
|
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
2016-02-05 15:42:48 -05:00
|
|
|
factory(global.moment)
|
2017-04-20 00:24:20 -04:00
|
|
|
}(this, (function (moment) { 'use strict';
|
2014-08-20 14:41:50 -04:00
|
|
|
|
2020-11-10 20:34:26 -05:00
|
|
|
//! moment.js locale configuration
|
2014-08-20 14:41:50 -04:00
|
|
|
|
2018-04-26 03:15:53 -04:00
|
|
|
function processRelativeTime(number, withoutSuffix, key, isFuture) {
|
|
|
|
var format = {
|
2020-11-10 20:34:26 -05:00
|
|
|
m: ['eng Minutt', 'enger Minutt'],
|
|
|
|
h: ['eng Stonn', 'enger Stonn'],
|
|
|
|
d: ['een Dag', 'engem Dag'],
|
|
|
|
M: ['ee Mount', 'engem Mount'],
|
|
|
|
y: ['ee Joer', 'engem Joer'],
|
2018-04-26 03:15:53 -04:00
|
|
|
};
|
|
|
|
return withoutSuffix ? format[key][0] : format[key][1];
|
2014-08-20 14:41:50 -04:00
|
|
|
}
|
2018-04-26 03:15:53 -04:00
|
|
|
function processFutureTime(string) {
|
|
|
|
var number = string.substr(0, string.indexOf(' '));
|
|
|
|
if (eifelerRegelAppliesToNumber(number)) {
|
|
|
|
return 'a ' + string;
|
|
|
|
}
|
|
|
|
return 'an ' + string;
|
2014-08-20 14:41:50 -04:00
|
|
|
}
|
2018-04-26 03:15:53 -04:00
|
|
|
function processPastTime(string) {
|
|
|
|
var number = string.substr(0, string.indexOf(' '));
|
|
|
|
if (eifelerRegelAppliesToNumber(number)) {
|
|
|
|
return 'viru ' + string;
|
2014-08-20 14:41:50 -04:00
|
|
|
}
|
2018-04-26 03:15:53 -04:00
|
|
|
return 'virun ' + string;
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Returns true if the word before the given number loses the '-n' ending.
|
|
|
|
* e.g. 'an 10 Deeg' but 'a 5 Deeg'
|
|
|
|
*
|
|
|
|
* @param number {integer}
|
|
|
|
* @returns {boolean}
|
|
|
|
*/
|
|
|
|
function eifelerRegelAppliesToNumber(number) {
|
|
|
|
number = parseInt(number, 10);
|
|
|
|
if (isNaN(number)) {
|
|
|
|
return false;
|
2017-04-20 00:24:20 -04:00
|
|
|
}
|
2018-04-26 03:15:53 -04:00
|
|
|
if (number < 0) {
|
|
|
|
// Negative Number --> always true
|
|
|
|
return true;
|
|
|
|
} else if (number < 10) {
|
|
|
|
// Only 1 digit
|
|
|
|
if (4 <= number && number <= 7) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
} else if (number < 100) {
|
|
|
|
// 2 digits
|
2020-11-10 20:34:26 -05:00
|
|
|
var lastDigit = number % 10,
|
|
|
|
firstDigit = number / 10;
|
2018-04-26 03:15:53 -04:00
|
|
|
if (lastDigit === 0) {
|
|
|
|
return eifelerRegelAppliesToNumber(firstDigit);
|
|
|
|
}
|
|
|
|
return eifelerRegelAppliesToNumber(lastDigit);
|
|
|
|
} else if (number < 10000) {
|
|
|
|
// 3 or 4 digits --> recursively check first digit
|
|
|
|
while (number >= 10) {
|
|
|
|
number = number / 10;
|
|
|
|
}
|
|
|
|
return eifelerRegelAppliesToNumber(number);
|
|
|
|
} else {
|
|
|
|
// Anything larger than 4 digits: recursively check first n-3 digits
|
|
|
|
number = number / 1000;
|
|
|
|
return eifelerRegelAppliesToNumber(number);
|
2017-04-20 00:24:20 -04:00
|
|
|
}
|
2014-08-20 14:41:50 -04:00
|
|
|
}
|
|
|
|
|
2018-04-26 03:15:53 -04:00
|
|
|
var lb = moment.defineLocale('lb', {
|
2020-11-10 20:34:26 -05:00
|
|
|
months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(
|
|
|
|
'_'
|
|
|
|
),
|
|
|
|
monthsParseExact: true,
|
|
|
|
weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(
|
|
|
|
'_'
|
|
|
|
),
|
2018-04-26 03:15:53 -04:00
|
|
|
weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
|
|
|
|
weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
|
2020-11-10 20:34:26 -05:00
|
|
|
weekdaysParseExact: true,
|
2018-04-26 03:15:53 -04:00
|
|
|
longDateFormat: {
|
|
|
|
LT: 'H:mm [Auer]',
|
|
|
|
LTS: 'H:mm:ss [Auer]',
|
|
|
|
L: 'DD.MM.YYYY',
|
|
|
|
LL: 'D. MMMM YYYY',
|
|
|
|
LLL: 'D. MMMM YYYY H:mm [Auer]',
|
2020-11-10 20:34:26 -05:00
|
|
|
LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',
|
2018-04-26 03:15:53 -04:00
|
|
|
},
|
|
|
|
calendar: {
|
|
|
|
sameDay: '[Haut um] LT',
|
|
|
|
sameElse: 'L',
|
|
|
|
nextDay: '[Muer um] LT',
|
|
|
|
nextWeek: 'dddd [um] LT',
|
|
|
|
lastDay: '[Gëschter um] LT',
|
|
|
|
lastWeek: function () {
|
|
|
|
// Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
|
|
|
|
switch (this.day()) {
|
|
|
|
case 2:
|
|
|
|
case 4:
|
|
|
|
return '[Leschten] dddd [um] LT';
|
|
|
|
default:
|
|
|
|
return '[Leschte] dddd [um] LT';
|
|
|
|
}
|
2020-11-10 20:34:26 -05:00
|
|
|
},
|
2018-04-26 03:15:53 -04:00
|
|
|
},
|
2020-11-10 20:34:26 -05:00
|
|
|
relativeTime: {
|
|
|
|
future: processFutureTime,
|
|
|
|
past: processPastTime,
|
|
|
|
s: 'e puer Sekonnen',
|
|
|
|
ss: '%d Sekonnen',
|
|
|
|
m: processRelativeTime,
|
|
|
|
mm: '%d Minutten',
|
|
|
|
h: processRelativeTime,
|
|
|
|
hh: '%d Stonnen',
|
|
|
|
d: processRelativeTime,
|
|
|
|
dd: '%d Deeg',
|
|
|
|
M: processRelativeTime,
|
|
|
|
MM: '%d Méint',
|
|
|
|
y: processRelativeTime,
|
|
|
|
yy: '%d Joer',
|
2018-04-26 03:15:53 -04:00
|
|
|
},
|
|
|
|
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
|
|
|
ordinal: '%d.',
|
|
|
|
week: {
|
|
|
|
dow: 1, // Monday is the first day of the week.
|
2020-11-10 20:34:26 -05:00
|
|
|
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
|
|
|
},
|
2018-04-26 03:15:53 -04:00
|
|
|
});
|
2016-02-05 15:42:48 -05:00
|
|
|
|
2018-04-26 03:15:53 -04:00
|
|
|
return lb;
|
2016-02-05 15:42:48 -05:00
|
|
|
|
2017-04-20 00:24:20 -04:00
|
|
|
})));
|