Node-Red configuration
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.

tr.js 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. //! moment.js locale configuration
  2. //! locale : Turkish [tr]
  3. //! authors : Erhan Gundogan : https://github.com/erhangundogan,
  4. //! Burak Yiğit Kaya: https://github.com/BYK
  5. import moment from '../moment';
  6. var suffixes = {
  7. 1: "'inci",
  8. 5: "'inci",
  9. 8: "'inci",
  10. 70: "'inci",
  11. 80: "'inci",
  12. 2: "'nci",
  13. 7: "'nci",
  14. 20: "'nci",
  15. 50: "'nci",
  16. 3: "'üncü",
  17. 4: "'üncü",
  18. 100: "'üncü",
  19. 6: "'ncı",
  20. 9: "'uncu",
  21. 10: "'uncu",
  22. 30: "'uncu",
  23. 60: "'ıncı",
  24. 90: "'ıncı",
  25. };
  26. export default moment.defineLocale('tr', {
  27. months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(
  28. '_'
  29. ),
  30. monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
  31. weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(
  32. '_'
  33. ),
  34. weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),
  35. weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
  36. meridiem: function (hours, minutes, isLower) {
  37. if (hours < 12) {
  38. return isLower ? 'öö' : 'ÖÖ';
  39. } else {
  40. return isLower ? 'ös' : 'ÖS';
  41. }
  42. },
  43. meridiemParse: /öö|ÖÖ|ös|ÖS/,
  44. isPM: function (input) {
  45. return input === 'ös' || input === 'ÖS';
  46. },
  47. longDateFormat: {
  48. LT: 'HH:mm',
  49. LTS: 'HH:mm:ss',
  50. L: 'DD.MM.YYYY',
  51. LL: 'D MMMM YYYY',
  52. LLL: 'D MMMM YYYY HH:mm',
  53. LLLL: 'dddd, D MMMM YYYY HH:mm',
  54. },
  55. calendar: {
  56. sameDay: '[bugün saat] LT',
  57. nextDay: '[yarın saat] LT',
  58. nextWeek: '[gelecek] dddd [saat] LT',
  59. lastDay: '[dün] LT',
  60. lastWeek: '[geçen] dddd [saat] LT',
  61. sameElse: 'L',
  62. },
  63. relativeTime: {
  64. future: '%s sonra',
  65. past: '%s önce',
  66. s: 'birkaç saniye',
  67. ss: '%d saniye',
  68. m: 'bir dakika',
  69. mm: '%d dakika',
  70. h: 'bir saat',
  71. hh: '%d saat',
  72. d: 'bir gün',
  73. dd: '%d gün',
  74. w: 'bir hafta',
  75. ww: '%d hafta',
  76. M: 'bir ay',
  77. MM: '%d ay',
  78. y: 'bir yıl',
  79. yy: '%d yıl',
  80. },
  81. ordinal: function (number, period) {
  82. switch (period) {
  83. case 'd':
  84. case 'D':
  85. case 'Do':
  86. case 'DD':
  87. return number;
  88. default:
  89. if (number === 0) {
  90. // special case for zero
  91. return number + "'ıncı";
  92. }
  93. var a = number % 10,
  94. b = (number % 100) - a,
  95. c = number >= 100 ? 100 : null;
  96. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  97. }
  98. },
  99. week: {
  100. dow: 1, // Monday is the first day of the week.
  101. doy: 7, // The week that contains Jan 7th is the first week of the year.
  102. },
  103. });