@titanium/turbo
Version:
π Turbo is the awesome framework for turbo charging your Titanium cross-platform native mobile app development!
110 lines (103 loc) β’ 3.87 kB
JavaScript
//! moment.js locale configuration
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('/alloy/moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var symbolMap = {
'1': 'α‘',
'2': 'α’',
'3': 'α£',
'4': 'α€',
'5': 'α₯',
'6': 'α¦',
'7': 'α§',
'8': 'α¨',
'9': 'α©',
'0': 'α '
}, numberMap = {
'α‘': '1',
'α’': '2',
'α£': '3',
'α€': '4',
'α₯': '5',
'α¦': '6',
'α§': '7',
'α¨': '8',
'α©': '9',
'α ': '0'
};
var km = moment.defineLocale('km', {
months: 'ααααΆ_αα»αααα_ααΈααΆ_ααααΆ_α§αααΆ_αα·αα»ααΆ_ααααααΆ_ααΈα αΆ_αααααΆ_αα»ααΆ_αα·α
ααα·ααΆ_ααααΌ'.split(
'_'
),
monthsShort: 'ααααΆ_αα»αααα_ααΈααΆ_ααααΆ_α§αααΆ_αα·αα»ααΆ_ααααααΆ_ααΈα αΆ_αααααΆ_αα»ααΆ_αα·α
ααα·ααΆ_ααααΌ'.split(
'_'
),
weekdays: 'α’αΆαα·ααα_α
αααα_α’ααααΆα_αα»α_αααα ααααα·α_αα»ααα_αα
αα'.split('_'),
weekdaysShort: 'α’αΆ_α
_α’_α_ααα_αα»_α'.split('_'),
weekdaysMin: 'α’αΆ_α
_α’_α_ααα_αα»_α'.split('_'),
weekdaysParseExact: true,
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'
},
meridiemParse: /ααααΉα|ααααΆα
/,
isPM: function (input) {
return input === 'ααααΆα
';
},
meridiem: function (hour, minute, isLower) {
if (hour < 12) {
return 'ααααΉα';
} else {
return 'ααααΆα
';
}
},
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 : 'ααΈ%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];
});
},
week: {
dow: 1, // Monday is the first day of the week.
doy: 4 // The week that contains Jan 4th is the first week of the year.
}
});
return km;
})));