Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

de-ch.js 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //! moment.js locale configuration
  2. //! locale : German (Switzerland) [de-ch]
  3. //! author : sschueller : https://github.com/sschueller
  4. // based on: https://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de#
  5. import moment from '../moment';
  6. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  7. var format = {
  8. 'm': ['eine Minute', 'einer Minute'],
  9. 'h': ['eine Stunde', 'einer Stunde'],
  10. 'd': ['ein Tag', 'einem Tag'],
  11. 'dd': [number + ' Tage', number + ' Tagen'],
  12. 'M': ['ein Monat', 'einem Monat'],
  13. 'MM': [number + ' Monate', number + ' Monaten'],
  14. 'y': ['ein Jahr', 'einem Jahr'],
  15. 'yy': [number + ' Jahre', number + ' Jahren']
  16. };
  17. return withoutSuffix ? format[key][0] : format[key][1];
  18. }
  19. export default moment.defineLocale('de-ch', {
  20. months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  21. monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  22. monthsParseExact : true,
  23. weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
  24. weekdaysShort : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  25. weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  26. weekdaysParseExact : true,
  27. longDateFormat : {
  28. LT: 'HH:mm',
  29. LTS: 'HH:mm:ss',
  30. L : 'DD.MM.YYYY',
  31. LL : 'D. MMMM YYYY',
  32. LLL : 'D. MMMM YYYY HH:mm',
  33. LLLL : 'dddd, D. MMMM YYYY HH:mm'
  34. },
  35. calendar : {
  36. sameDay: '[heute um] LT [Uhr]',
  37. sameElse: 'L',
  38. nextDay: '[morgen um] LT [Uhr]',
  39. nextWeek: 'dddd [um] LT [Uhr]',
  40. lastDay: '[gestern um] LT [Uhr]',
  41. lastWeek: '[letzten] dddd [um] LT [Uhr]'
  42. },
  43. relativeTime : {
  44. future : 'in %s',
  45. past : 'vor %s',
  46. s : 'ein paar Sekunden',
  47. ss : '%d Sekunden',
  48. m : processRelativeTime,
  49. mm : '%d Minuten',
  50. h : processRelativeTime,
  51. hh : '%d Stunden',
  52. d : processRelativeTime,
  53. dd : processRelativeTime,
  54. M : processRelativeTime,
  55. MM : processRelativeTime,
  56. y : processRelativeTime,
  57. yy : processRelativeTime
  58. },
  59. dayOfMonthOrdinalParse: /\d{1,2}\./,
  60. ordinal : '%d.',
  61. week : {
  62. dow : 1, // Monday is the first day of the week.
  63. doy : 4 // The week that contains Jan 4th is the first week of the year.
  64. }
  65. });