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.

102 lines
4.5 KiB

3 weeks ago
//! moment.js locale configuration
//! locale : Georgian (ka)
//! author : Irakli Janiashvili : https://github.com/irakli-janiashvili
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../moment')) :
typeof define === 'function' && define.amd ? define(['moment'], factory) :
factory(global.moment)
}(this, function (moment) { 'use strict';
function monthsCaseReplace(m, format) {
var months = {
'nominative': '___________'.split('_'),
'accusative': '___________'.split('_')
},
nounCase = (/D[oD] *MMMM?/).test(format) ?
'accusative' :
'nominative';
return months[nounCase][m.month()];
}
function weekdaysCaseReplace(m, format) {
var weekdays = {
'nominative': '______'.split('_'),
'accusative': '______'.split('_')
},
nounCase = (/(|)/).test(format) ?
'accusative' :
'nominative';
return weekdays[nounCase][m.day()];
}
var ka = moment.defineLocale('ka', {
months : monthsCaseReplace,
monthsShort : '___________'.split('_'),
weekdays : weekdaysCaseReplace,
weekdaysShort : '______'.split('_'),
weekdaysMin : '______'.split('_'),
longDateFormat : {
LT : 'h:mm A',
LTS : 'h:mm:ss A',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY h:mm A',
LLLL : 'dddd, D MMMM YYYY h:mm A'
},
calendar : {
sameDay : '[] LT[-]',
nextDay : '[] LT[-]',
lastDay : '[] LT[-]',
nextWeek : '[] dddd LT[-]',
lastWeek : '[] dddd LT-',
sameElse : 'L'
},
relativeTime : {
future : function (s) {
return (/(|||)/).test(s) ?
s.replace(/$/, '') :
s + '';
},
past : function (s) {
if ((/(||||)/).test(s)) {
return s.replace(/(|)$/, ' ');
}
if ((//).test(s)) {
return s.replace(/$/, ' ');
}
},
s : ' ',
m : '',
mm : '%d ',
h : '',
hh : '%d ',
d : '',
dd : '%d ',
M : '',
MM : '%d ',
y : '',
yy : '%d '
},
ordinalParse: /0|1-|-\d{1,2}|\d{1,2}-/,
ordinal : function (number) {
if (number === 0) {
return number;
}
if (number === 1) {
return number + '-';
}
if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) {
return '-' + number;
}
return number + '-';
},
week : {
dow : 1,
doy : 7
}
});
return ka;
}));