tr.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 : '[haftaya] dddd [saat] LT',
  49. lastDay : '[dün] LT',
  50. lastWeek : '[geçen hafta] dddd [saat] LT',
  51. sameElse : 'L'
  52. },
  53. relativeTime : {
  54. future : '%s sonra',
  55. past : '%s önce',
  56. s : 'birkaç saniye',
  57. m : 'bir dakika',
  58. mm : '%d dakika',
  59. h : 'bir saat',
  60. hh : '%d saat',
  61. d : 'bir gün',
  62. dd : '%d gün',
  63. M : 'bir ay',
  64. MM : '%d ay',
  65. y : 'bir yıl',
  66. yy : '%d yıl'
  67. },
  68. dayOfMonthOrdinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
  69. ordinal : function (number) {
  70. if (number === 0) { // special case for zero
  71. return number + '\'ıncı';
  72. }
  73. var a = number % 10,
  74. b = number % 100 - a,
  75. c = number >= 100 ? 100 : null;
  76. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  77. },
  78. week : {
  79. dow : 1, // Monday is the first day of the week.
  80. doy : 7 // The week that contains Jan 1st is the first week of the year.
  81. }
  82. });
  83. return tr;
  84. })));