afa823472b8b30aab8ccc32391b7d24c1889b08dc8cf2f17627b60271193e100b32227a43b846471378a87a831372037d5f66a6a13d864560df7b4feba1d66 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //! moment.js locale configuration
  2. //! locale : talossan (tzl)
  3. //! author : Robin van der Vliet : https://github.com/robin0van0der0v with the help of Iustì Canun
  4. import moment from '../moment';
  5. // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
  6. // This is currently too difficult (maybe even impossible) to add.
  7. export default moment.defineLocale('tzl', {
  8. months : 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'),
  9. monthsShort : 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
  10. weekdays : 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
  11. weekdaysShort : 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
  12. weekdaysMin : 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
  13. longDateFormat : {
  14. LT : 'HH.mm',
  15. LTS : 'HH.mm.ss',
  16. L : 'DD.MM.YYYY',
  17. LL : 'D. MMMM [dallas] YYYY',
  18. LLL : 'D. MMMM [dallas] YYYY HH.mm',
  19. LLLL : 'dddd, [li] D. MMMM [dallas] YYYY HH.mm'
  20. },
  21. meridiemParse: /d\'o|d\'a/i,
  22. isPM : function (input) {
  23. return 'd\'o' === input.toLowerCase();
  24. },
  25. meridiem : function (hours, minutes, isLower) {
  26. if (hours > 11) {
  27. return isLower ? 'd\'o' : 'D\'O';
  28. } else {
  29. return isLower ? 'd\'a' : 'D\'A';
  30. }
  31. },
  32. calendar : {
  33. sameDay : '[oxhi à] LT',
  34. nextDay : '[demà à] LT',
  35. nextWeek : 'dddd [à] LT',
  36. lastDay : '[ieiri à] LT',
  37. lastWeek : '[sür el] dddd [lasteu à] LT',
  38. sameElse : 'L'
  39. },
  40. relativeTime : {
  41. future : 'osprei %s',
  42. past : 'ja%s',
  43. s : processRelativeTime,
  44. m : processRelativeTime,
  45. mm : processRelativeTime,
  46. h : processRelativeTime,
  47. hh : processRelativeTime,
  48. d : processRelativeTime,
  49. dd : processRelativeTime,
  50. M : processRelativeTime,
  51. MM : processRelativeTime,
  52. y : processRelativeTime,
  53. yy : processRelativeTime
  54. },
  55. ordinalParse: /\d{1,2}\./,
  56. ordinal : '%d.',
  57. week : {
  58. dow : 1, // Monday is the first day of the week.
  59. doy : 4 // The week that contains Jan 4th is the first week of the year.
  60. }
  61. });
  62. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  63. var format = {
  64. 's': ['viensas secunds', '\'iensas secunds'],
  65. 'm': ['\'n míut', '\'iens míut'],
  66. 'mm': [number + ' míuts', '' + number + ' míuts'],
  67. 'h': ['\'n þora', '\'iensa þora'],
  68. 'hh': [number + ' þoras', '' + number + ' þoras'],
  69. 'd': ['\'n ziua', '\'iensa ziua'],
  70. 'dd': [number + ' ziuas', '' + number + ' ziuas'],
  71. 'M': ['\'n mes', '\'iens mes'],
  72. 'MM': [number + ' mesen', '' + number + ' mesen'],
  73. 'y': ['\'n ar', '\'iens ar'],
  74. 'yy': [number + ' ars', '' + number + ' ars']
  75. };
  76. return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]);
  77. }