de-at.js 2.9 KB

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