tzl.js 3.3 KB

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