de.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. ;(function (global, factory) {
  7. typeof exports === 'object' && typeof module !== 'undefined'
  8. && typeof require === 'function' ? factory(require('../moment')) :
  9. typeof define === 'function' && define.amd ? define(['moment'], factory) :
  10. factory(global.moment)
  11. }(this, function (moment) { 'use strict';
  12. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  13. var format = {
  14. 'm': ['eine Minute', 'einer Minute'],
  15. 'h': ['eine Stunde', 'einer Stunde'],
  16. 'd': ['ein Tag', 'einem Tag'],
  17. 'dd': [number + ' Tage', number + ' Tagen'],
  18. 'M': ['ein Monat', 'einem Monat'],
  19. 'MM': [number + ' Monate', number + ' Monaten'],
  20. 'y': ['ein Jahr', 'einem Jahr'],
  21. 'yy': [number + ' Jahre', number + ' Jahren']
  22. };
  23. return withoutSuffix ? format[key][0] : format[key][1];
  24. }
  25. var de = moment.defineLocale('de', {
  26. months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  27. monthsShort : 'Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),
  28. monthsParseExact : true,
  29. weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
  30. weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  31. weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  32. weekdaysParseExact : true,
  33. longDateFormat : {
  34. LT: 'HH:mm',
  35. LTS: 'HH:mm:ss',
  36. L : 'DD.MM.YYYY',
  37. LL : 'D. MMMM YYYY',
  38. LLL : 'D. MMMM YYYY HH:mm',
  39. LLLL : 'dddd, D. MMMM YYYY HH:mm'
  40. },
  41. calendar : {
  42. sameDay: '[heute um] LT [Uhr]',
  43. sameElse: 'L',
  44. nextDay: '[morgen um] LT [Uhr]',
  45. nextWeek: 'dddd [um] LT [Uhr]',
  46. lastDay: '[gestern um] LT [Uhr]',
  47. lastWeek: '[letzten] dddd [um] LT [Uhr]'
  48. },
  49. relativeTime : {
  50. future : 'in %s',
  51. past : 'vor %s',
  52. s : 'ein paar Sekunden',
  53. m : processRelativeTime,
  54. mm : '%d Minuten',
  55. h : processRelativeTime,
  56. hh : '%d Stunden',
  57. d : processRelativeTime,
  58. dd : processRelativeTime,
  59. M : processRelativeTime,
  60. MM : processRelativeTime,
  61. y : processRelativeTime,
  62. yy : processRelativeTime
  63. },
  64. ordinalParse: /\d{1,2}\./,
  65. ordinal : '%d.',
  66. week : {
  67. dow : 1, // Monday is the first day of the week.
  68. doy : 4 // The week that contains Jan 4th is the first week of the year.
  69. }
  70. });
  71. return de;
  72. }));