Innovenergy_trunk/frontend/node_modules/moment/dist/locale/kn.js

125 lines
4.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//! moment.js locale configuration
//! locale : Kannada [kn]
//! author : Rajeev Naik : https://github.com/rajeevnaikte
import moment from '../moment';
var symbolMap = {
1: '೧',
2: '೨',
3: '೩',
4: '೪',
5: '೫',
6: '೬',
7: '೭',
8: '೮',
9: '೯',
0: '',
},
numberMap = {
'೧': '1',
'೨': '2',
'೩': '3',
'೪': '4',
'೫': '5',
'೬': '6',
'': '7',
'': '8',
'': '9',
'': '0',
};
export default moment.defineLocale('kn', {
months: 'ಜನವರಿ_ಫರವರಿ_ಮ_ಏಪಿ_ಮ_ಜ_ಜ_ಆಗಸ_ಸಬರ_ಅಕಬರ_ನವಬರ_ಡಿಬರ'.split(
'_'
),
monthsShort:
'ಜನ_ಫ_ಮ_ಏಪಿ_ಮ_ಜ_ಜ_ಆಗಸ_ಸ_ಅಕ_ನವ_ಡಿ'.split(
'_'
),
monthsParseExact: true,
weekdays: '_ಸಮವ_ಮಗಳವ_ಬಧವ_ಗ_ಶರವ_ಶನಿ'.split(
'_'
),
weekdaysShort: '_ಸ_ಮಗಳ_ಬ_ಗ_ಶ_ಶನಿ'.split('_'),
weekdaysMin: '_ಸ_ಮ_ಬ_ಗ_ಶ_ಶ'.split('_'),
longDateFormat: {
LT: 'A h:mm',
LTS: 'A h:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm',
LLLL: 'dddd, D MMMM YYYY, A h:mm',
},
calendar: {
sameDay: '[] LT',
nextDay: '[] LT',
nextWeek: 'dddd, LT',
lastDay: '[ಿ] LT',
lastWeek: '[] dddd, LT',
sameElse: 'L',
},
relativeTime: {
future: '%s ತರ',
past: '%s ಿ',
s: 'ಲವ ಷಣಗಳ',
ss: '%d ಗಳ',
m: ' ಿಿ',
mm: '%d ಿಿ',
h: ' ',
hh: '%d ',
d: ' ಿ',
dd: '%d ಿ',
M: ' ಿಗಳ',
MM: '%d ಿಗಳ',
y: ' ವರ',
yy: '%d ವರ',
},
preparse: function (string) {
return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'ಿ') {
return hour < 4 ? hour : hour + 12;
} else if (meridiem === 'ಿ') {
return hour;
} else if (meridiem === 'ಮಧ') {
return hour >= 10 ? hour : hour + 12;
} else if (meridiem === '') {
return hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
if (hour < 4) {
return 'ಿ';
} else if (hour < 10) {
return 'ಿ';
} else if (hour < 17) {
return 'ಮಧ';
} else if (hour < 20) {
return '';
} else {
return 'ಿ';
}
},
dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
ordinal: function (number) {
return number + '';
},
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
},
});