tr.js 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. ;(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. var suffixes = {
  12. 1: '\'inci',
  13. 5: '\'inci',
  14. 8: '\'inci',
  15. 70: '\'inci',
  16. 80: '\'inci',
  17. 2: '\'nci',
  18. 7: '\'nci',
  19. 20: '\'nci',
  20. 50: '\'nci',
  21. 3: '\'üncü',
  22. 4: '\'üncü',
  23. 100: '\'üncü',
  24. 6: '\'ncı',
  25. 9: '\'uncu',
  26. 10: '\'uncu',
  27. 30: '\'uncu',
  28. 60: '\'ıncı',
  29. 90: '\'ıncı'
  30. };
  31. var tr = moment.defineLocale('tr', {
  32. months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
  33. monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
  34. weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
  35. weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
  36. weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
  37. longDateFormat : {
  38. LT : 'HH:mm',
  39. LTS : 'HH:mm:ss',
  40. L : 'DD.MM.YYYY',
  41. LL : 'D MMMM YYYY',
  42. LLL : 'D MMMM YYYY HH:mm',
  43. LLLL : 'dddd, D MMMM YYYY HH:mm'
  44. },
  45. calendar : {
  46. sameDay : '[bugün saat] LT',
  47. nextDay : '[yarın saat] LT',
  48. nextWeek : '[gelecek] dddd [saat] LT',
  49. lastDay : '[dün] LT',
  50. lastWeek : '[geçen] dddd [saat] LT',
  51. sameElse : 'L'
  52. },
  53. relativeTime : {
  54. future : '%s sonra',
  55. past : '%s önce',
  56. s : 'birkaç saniye',
  57. ss : '%d saniye',
  58. m : 'bir dakika',
  59. mm : '%d dakika',
  60. h : 'bir saat',
  61. hh : '%d saat',
  62. d : 'bir gün',
  63. dd : '%d gün',
  64. M : 'bir ay',
  65. MM : '%d ay',
  66. y : 'bir yıl',
  67. yy : '%d yıl'
  68. },
  69. dayOfMonthOrdinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
  70. ordinal : function (number) {
  71. if (number === 0) { // special case for zero
  72. return number + '\'ıncı';
  73. }
  74. var a = number % 10,
  75. b = number % 100 - a,
  76. c = number >= 100 ? 100 : null;
  77. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  78. },
  79. week : {
  80. dow : 1, // Monday is the first day of the week.
  81. doy : 7 // The week that contains Jan 1st is the first week of the year.
  82. }
  83. });
  84. return tr;
  85. })));