gom-latn.js (4952B)
1//! moment.js locale configuration 2//! locale : Konkani Latin script [gom-latn] 3//! author : The Discoverer : https://github.com/WikiDiscoverer 4 5;(function (global, factory) { 6 typeof exports === 'object' && typeof module !== 'undefined' 7 && typeof require === 'function' ? factory(require('../moment')) : 8 typeof define === 'function' && define.amd ? define(['../moment'], factory) : 9 factory(global.moment) 10}(this, (function (moment) { 'use strict'; 11 12 //! moment.js locale configuration 13 14 function processRelativeTime(number, withoutSuffix, key, isFuture) { 15 var format = { 16 s: ['thoddea sekondamni', 'thodde sekond'], 17 ss: [number + ' sekondamni', number + ' sekond'], 18 m: ['eka mintan', 'ek minut'], 19 mm: [number + ' mintamni', number + ' mintam'], 20 h: ['eka voran', 'ek vor'], 21 hh: [number + ' voramni', number + ' voram'], 22 d: ['eka disan', 'ek dis'], 23 dd: [number + ' disamni', number + ' dis'], 24 M: ['eka mhoinean', 'ek mhoino'], 25 MM: [number + ' mhoineamni', number + ' mhoine'], 26 y: ['eka vorsan', 'ek voros'], 27 yy: [number + ' vorsamni', number + ' vorsam'], 28 }; 29 return isFuture ? format[key][0] : format[key][1]; 30 } 31 32 var gomLatn = moment.defineLocale('gom-latn', { 33 months: { 34 standalone: 35 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split( 36 '_' 37 ), 38 format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split( 39 '_' 40 ), 41 isFormat: /MMMM(\s)+D[oD]?/, 42 }, 43 monthsShort: 44 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'), 45 monthsParseExact: true, 46 weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'), 47 weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), 48 weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), 49 weekdaysParseExact: true, 50 longDateFormat: { 51 LT: 'A h:mm [vazta]', 52 LTS: 'A h:mm:ss [vazta]', 53 L: 'DD-MM-YYYY', 54 LL: 'D MMMM YYYY', 55 LLL: 'D MMMM YYYY A h:mm [vazta]', 56 LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]', 57 llll: 'ddd, D MMM YYYY, A h:mm [vazta]', 58 }, 59 calendar: { 60 sameDay: '[Aiz] LT', 61 nextDay: '[Faleam] LT', 62 nextWeek: '[Fuddlo] dddd[,] LT', 63 lastDay: '[Kal] LT', 64 lastWeek: '[Fattlo] dddd[,] LT', 65 sameElse: 'L', 66 }, 67 relativeTime: { 68 future: '%s', 69 past: '%s adim', 70 s: processRelativeTime, 71 ss: processRelativeTime, 72 m: processRelativeTime, 73 mm: processRelativeTime, 74 h: processRelativeTime, 75 hh: processRelativeTime, 76 d: processRelativeTime, 77 dd: processRelativeTime, 78 M: processRelativeTime, 79 MM: processRelativeTime, 80 y: processRelativeTime, 81 yy: processRelativeTime, 82 }, 83 dayOfMonthOrdinalParse: /\d{1,2}(er)/, 84 ordinal: function (number, period) { 85 switch (period) { 86 // the ordinal 'er' only applies to day of the month 87 case 'D': 88 return number + 'er'; 89 default: 90 case 'M': 91 case 'Q': 92 case 'DDD': 93 case 'd': 94 case 'w': 95 case 'W': 96 return number; 97 } 98 }, 99 week: { 100 dow: 0, // Sunday is the first day of the week 101 doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4) 102 }, 103 meridiemParse: /rati|sokallim|donparam|sanje/, 104 meridiemHour: function (hour, meridiem) { 105 if (hour === 12) { 106 hour = 0; 107 } 108 if (meridiem === 'rati') { 109 return hour < 4 ? hour : hour + 12; 110 } else if (meridiem === 'sokallim') { 111 return hour; 112 } else if (meridiem === 'donparam') { 113 return hour > 12 ? hour : hour + 12; 114 } else if (meridiem === 'sanje') { 115 return hour + 12; 116 } 117 }, 118 meridiem: function (hour, minute, isLower) { 119 if (hour < 4) { 120 return 'rati'; 121 } else if (hour < 12) { 122 return 'sokallim'; 123 } else if (hour < 16) { 124 return 'donparam'; 125 } else if (hour < 20) { 126 return 'sanje'; 127 } else { 128 return 'rati'; 129 } 130 }, 131 }); 132 133 return gomLatn; 134 135})));