You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

140 lines
5.5 KiB

//! moment.js locale configuration
//! locale : Tamil [ta]
//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var symbolMap = {
1: '௧',
2: '௨',
3: '௩',
4: '௪',
5: '௫',
6: '௬',
7: '௭',
8: '௮',
9: '௯',
0: '௦',
},
numberMap = {
'௧': '1',
'௨': '2',
'௩': '3',
'௪': '4',
'௫': '5',
'௬': '6',
'௭': '7',
'௮': '8',
'௯': '9',
'௦': '0',
};
var ta = moment.defineLocale('ta', {
months: 'ஜனவரி_பிரவரி_ம_ஏபரல_ம_ஜ_ஜ_ஆகஸ_சபர_அகபர_நவமபர_டிசமபர'.split(
'_'
),
monthsShort: 'ஜனவரி_பிரவரி_ம_ஏபரல_ம_ஜ_ஜ_ஆகஸ_சபர_அகபர_நவமபர_டிசமபர'.split(
'_'
),
weekdays: 'ஞிிழம_திகடிழம_சிழம_பதனிழம_விழகிழம_விிழம_சனிிழம'.split(
'_'
),
weekdaysShort: 'ஞி_திகள_ச_பதன_விழன_வி_சனி'.split(
'_'
),
weekdaysMin: 'ஞ_தி_ச_ப_வி_வ_ச'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, HH:mm',
LLLL: 'dddd, D MMMM YYYY, HH: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 ஆணகள',
},
dayOfMonthOrdinalParse: /\d{1,2}வத/,
ordinal: function (number) {
return number + 'வத';
},
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];
});
},
// refer http://ta.wikipedia.org/s/1er1
meridiemParse: /யமம|வகற|க|நணபகல|எற|ம/,
meridiem: function (hour, minute, isLower) {
if (hour < 2) {
return ' யமம';
} else if (hour < 6) {
return ' வகற'; // வகற
} else if (hour < 10) {
return ' க'; // க
} else if (hour < 14) {
return ' நணபகல'; // நணபகல
} else if (hour < 18) {
return ' எற'; // எற
} else if (hour < 22) {
return ' ம'; // ம
} else {
return ' யமம';
}
},
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'யமம') {
return hour < 2 ? hour : hour + 12;
} else if (meridiem === 'வகற' || meridiem === 'க') {
return hour;
} else if (meridiem === 'நணபகல') {
return hour >= 10 ? hour : hour + 12;
} else {
return hour + 12;
}
},
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.
},
});
return ta;
})));