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