de.js 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. (function (factory) {
  6. if (typeof define === 'function' && define.amd) {
  7. define(['moment'], factory); // AMD
  8. } else if (typeof exports === 'object') {
  9. module.exports = factory(require('../moment')); // Node
  10. } else {
  11. factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
  12. }
  13. }(function (moment) {
  14. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  15. var format = {
  16. 'm': ['eine Minute', 'einer Minute'],
  17. 'h': ['eine Stunde', 'einer Stunde'],
  18. 'd': ['ein Tag', 'einem Tag'],
  19. 'dd': [number + ' Tage', number + ' Tagen'],
  20. 'M': ['ein Monat', 'einem Monat'],
  21. 'MM': [number + ' Monate', number + ' Monaten'],
  22. 'y': ['ein Jahr', 'einem Jahr'],
  23. 'yy': [number + ' Jahre', number + ' Jahren']
  24. };
  25. return withoutSuffix ? format[key][0] : format[key][1];
  26. }
  27. return moment.defineLocale('de', {
  28. months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  29. monthsShort : 'Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),
  30. weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
  31. weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  32. weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  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 LT',
  39. LLLL : 'dddd, D. MMMM YYYY LT'
  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. }));