de.js (2562B)
1//! moment.js locale configuration 2//! locale : German [de] 3//! author : lluchs : https://github.com/lluchs 4//! author: Menelion Elensúle: https://github.com/Oire 5//! author : Mikolaj Dadela : https://github.com/mik01aj 6 7import moment from '../moment'; 8 9function processRelativeTime(number, withoutSuffix, key, isFuture) { 10 var format = { 11 m: ['eine Minute', 'einer Minute'], 12 h: ['eine Stunde', 'einer Stunde'], 13 d: ['ein Tag', 'einem Tag'], 14 dd: [number + ' Tage', number + ' Tagen'], 15 w: ['eine Woche', 'einer Woche'], 16 M: ['ein Monat', 'einem Monat'], 17 MM: [number + ' Monate', number + ' Monaten'], 18 y: ['ein Jahr', 'einem Jahr'], 19 yy: [number + ' Jahre', number + ' Jahren'], 20 }; 21 return withoutSuffix ? format[key][0] : format[key][1]; 22} 23 24export default moment.defineLocale('de', { 25 months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( 26 '_' 27 ), 28 monthsShort: 29 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), 30 monthsParseExact: true, 31 weekdays: 32 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( 33 '_' 34 ), 35 weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), 36 weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), 37 weekdaysParseExact: true, 38 longDateFormat: { 39 LT: 'HH:mm', 40 LTS: 'HH:mm:ss', 41 L: 'DD.MM.YYYY', 42 LL: 'D. MMMM YYYY', 43 LLL: 'D. MMMM YYYY HH:mm', 44 LLLL: 'dddd, D. MMMM YYYY HH:mm', 45 }, 46 calendar: { 47 sameDay: '[heute um] LT [Uhr]', 48 sameElse: 'L', 49 nextDay: '[morgen um] LT [Uhr]', 50 nextWeek: 'dddd [um] LT [Uhr]', 51 lastDay: '[gestern um] LT [Uhr]', 52 lastWeek: '[letzten] dddd [um] LT [Uhr]', 53 }, 54 relativeTime: { 55 future: 'in %s', 56 past: 'vor %s', 57 s: 'ein paar Sekunden', 58 ss: '%d Sekunden', 59 m: processRelativeTime, 60 mm: '%d Minuten', 61 h: processRelativeTime, 62 hh: '%d Stunden', 63 d: processRelativeTime, 64 dd: processRelativeTime, 65 w: processRelativeTime, 66 ww: '%d Wochen', 67 M: processRelativeTime, 68 MM: processRelativeTime, 69 y: processRelativeTime, 70 yy: processRelativeTime, 71 }, 72 dayOfMonthOrdinalParse: /\d{1,2}\./, 73 ordinal: '%d.', 74 week: { 75 dow: 1, // Monday is the first day of the week. 76 doy: 4, // The week that contains Jan 4th is the first week of the year. 77 }, 78});