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