tzl.js 3.5 KB

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