e8a17e5c33ae608e8610aa11c830676a75cc0c0edf9c8d5aacfa39985f5221aa470dae19baa06566e432400557fde2d65f30464a290ce45e99c731b6e46c79 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
  29. weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
  30. weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
  31. weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
  32. longDateFormat : {
  33. LT : 'HH:mm',
  34. LTS : 'HH:mm:ss',
  35. L : 'DD.MM.YYYY',
  36. LL : 'D MMMM YYYY',
  37. LLL : 'D MMMM YYYY HH:mm',
  38. LLLL : 'dddd, D MMMM YYYY HH:mm'
  39. },
  40. calendar : {
  41. sameDay : '[bugün saat] LT',
  42. nextDay : '[yarın saat] LT',
  43. nextWeek : '[haftaya] dddd [saat] LT',
  44. lastDay : '[dün] LT',
  45. lastWeek : '[geçen hafta] dddd [saat] LT',
  46. sameElse : 'L'
  47. },
  48. relativeTime : {
  49. future : '%s sonra',
  50. past : '%s önce',
  51. s : 'birkaç saniye',
  52. m : 'bir dakika',
  53. mm : '%d dakika',
  54. h : 'bir saat',
  55. hh : '%d saat',
  56. d : 'bir gün',
  57. dd : '%d gün',
  58. M : 'bir ay',
  59. MM : '%d ay',
  60. y : 'bir yıl',
  61. yy : '%d yıl'
  62. },
  63. ordinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
  64. ordinal : function (number) {
  65. if (number === 0) { // special case for zero
  66. return number + '\'ıncı';
  67. }
  68. var a = number % 10,
  69. b = number % 100 - a,
  70. c = number >= 100 ? 100 : null;
  71. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  72. },
  73. week : {
  74. dow : 1, // Monday is the first day of the week.
  75. doy : 7 // The week that contains Jan 1st is the first week of the year.
  76. }
  77. });