de-at.js 2.6 KB

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