tr.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. // moment.js language configuration
  2. // language : turkish (tr)
  3. // authors : Erhan Gundogan : https://github.com/erhangundogan,
  4. // Burak Yiğit Kaya: https://github.com/BYK
  5. (function (factory) {
  6. if (typeof define === 'function' && define.amd) {
  7. define(['moment'], factory); // AMD
  8. } else if (typeof exports === 'object') {
  9. module.exports = factory(require('../moment')); // Node
  10. } else {
  11. factory(window.moment); // Browser global
  12. }
  13. }(function (moment) {
  14. var suffixes = {
  15. 1: "'inci",
  16. 5: "'inci",
  17. 8: "'inci",
  18. 70: "'inci",
  19. 80: "'inci",
  20. 2: "'nci",
  21. 7: "'nci",
  22. 20: "'nci",
  23. 50: "'nci",
  24. 3: "'üncü",
  25. 4: "'üncü",
  26. 100: "'üncü",
  27. 6: "'ncı",
  28. 9: "'uncu",
  29. 10: "'uncu",
  30. 30: "'uncu",
  31. 60: "'ıncı",
  32. 90: "'ıncı"
  33. };
  34. return moment.lang('tr', {
  35. months : "Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),
  36. monthsShort : "Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),
  37. weekdays : "Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),
  38. weekdaysShort : "Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),
  39. weekdaysMin : "Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),
  40. longDateFormat : {
  41. LT : "HH:mm",
  42. L : "DD.MM.YYYY",
  43. LL : "D MMMM YYYY",
  44. LLL : "D MMMM YYYY LT",
  45. LLLL : "dddd, D MMMM YYYY LT"
  46. },
  47. calendar : {
  48. sameDay : '[bugün saat] LT',
  49. nextDay : '[yarın saat] LT',
  50. nextWeek : '[haftaya] dddd [saat] LT',
  51. lastDay : '[dün] LT',
  52. lastWeek : '[geçen hafta] dddd [saat] LT',
  53. sameElse : 'L'
  54. },
  55. relativeTime : {
  56. future : "%s sonra",
  57. past : "%s önce",
  58. s : "birkaç saniye",
  59. m : "bir dakika",
  60. mm : "%d dakika",
  61. h : "bir saat",
  62. hh : "%d saat",
  63. d : "bir gün",
  64. dd : "%d gün",
  65. M : "bir ay",
  66. MM : "%d ay",
  67. y : "bir yıl",
  68. yy : "%d yıl"
  69. },
  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. }));