| 1 |
//! moment.js locale configuration |
| 2 |
//! locale : Azerbaijani [az] |
| 3 |
//! author : topchiyev : https://github.com/topchiyev |
| 4 |
|
| 5 |
import moment from '../moment'; |
| 6 |
|
| 7 |
var suffixes = { |
| 8 |
1: '-inci', |
| 9 |
5: '-inci', |
| 10 |
8: '-inci', |
| 11 |
70: '-inci', |
| 12 |
80: '-inci', |
| 13 |
2: '-nci', |
| 14 |
7: '-nci', |
| 15 |
20: '-nci', |
| 16 |
50: '-nci', |
| 17 |
3: '-üncü', |
| 18 |
4: '-üncü', |
| 19 |
100: '-üncü', |
| 20 |
6: '-ncı', |
| 21 |
9: '-uncu', |
| 22 |
10: '-uncu', |
| 23 |
30: '-uncu', |
| 24 |
60: '-ıncı', |
| 25 |
90: '-ıncı', |
| 26 |
}; |
| 27 |
|
| 28 |
export default moment.defineLocale('az', { |
| 29 |
months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split( |
| 30 |
'_' |
| 31 |
), |
| 32 |
monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), |
| 33 |
weekdays: |
| 34 |
'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split( |
| 35 |
'_' |
| 36 |
), |
| 37 |
weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), |
| 38 |
weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), |
| 39 |
weekdaysParseExact: true, |
| 40 |
longDateFormat: { |
| 41 |
LT: 'HH:mm', |
| 42 |
LTS: 'HH:mm:ss', |
| 43 |
L: 'DD.MM.YYYY', |
| 44 |
LL: 'D MMMM YYYY', |
| 45 |
LLL: 'D MMMM YYYY HH:mm', |
| 46 |
LLLL: 'dddd, D MMMM YYYY HH:mm', |
| 47 |
}, |
| 48 |
calendar: { |
| 49 |
sameDay: '[bugün saat] LT', |
| 50 |
nextDay: '[sabah saat] LT', |
| 51 |
nextWeek: '[gələn həftə] dddd [saat] LT', |
| 52 |
lastDay: '[dünən] LT', |
| 53 |
lastWeek: '[keçən həftə] dddd [saat] LT', |
| 54 |
sameElse: 'L', |
| 55 |
}, |
| 56 |
relativeTime: { |
| 57 |
future: '%s sonra', |
| 58 |
past: '%s əvvəl', |
| 59 |
s: 'bir neçə saniyə', |
| 60 |
ss: '%d saniyə', |
| 61 |
m: 'bir dəqiqə', |
| 62 |
mm: '%d dəqiqə', |
| 63 |
h: 'bir saat', |
| 64 |
hh: '%d saat', |
| 65 |
d: 'bir gün', |
| 66 |
dd: '%d gün', |
| 67 |
M: 'bir ay', |
| 68 |
MM: '%d ay', |
| 69 |
y: 'bir il', |
| 70 |
yy: '%d il', |
| 71 |
}, |
| 72 |
meridiemParse: /gecə|səhər|gündüz|axşam/, |
| 73 |
isPM: function (input) { |
| 74 |
return /^(gündüz|axşam)$/.test(input); |
| 75 |
}, |
| 76 |
meridiem: function (hour, minute, isLower) { |
| 77 |
if (hour < 4) { |
| 78 |
return 'gecə'; |
| 79 |
} else if (hour < 12) { |
| 80 |
return 'səhər'; |
| 81 |
} else if (hour < 17) { |
| 82 |
return 'gündüz'; |
| 83 |
} else { |
| 84 |
return 'axşam'; |
| 85 |
} |
| 86 |
}, |
| 87 |
dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, |
| 88 |
ordinal: function (number) { |
| 89 |
if (number === 0) { |
| 90 |
// special case for zero |
| 91 |
return number + '-ıncı'; |
| 92 |
} |
| 93 |
var a = number % 10, |
| 94 |
b = (number % 100) - a, |
| 95 |
c = number >= 100 ? 100 : null; |
| 96 |
return number + (suffixes[a] || suffixes[b] || suffixes[c]); |
| 97 |
}, |
| 98 |
week: { |
| 99 |
dow: 1, // Monday is the first day of the week. |
| 100 |
doy: 7, // The week that contains Jan 7th is the first week of the year. |
| 101 |
}, |
| 102 |
}); |