UNPKG

6.29 kBJavaScriptView Raw
1//! moment.js locale configuration
2//! locale : Konkani Devanagari script [gom-deva]
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: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],
17 ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],
18 m: ['एका मिणटान', 'एक मिनूट'],
19 mm: [number + ' मिणटांनी', number + ' मिणटां'],
20 h: ['एका वरान', 'एक वर'],
21 hh: [number + ' वरांनी', number + ' वरां'],
22 d: ['एका दिसान', 'एक दीस'],
23 dd: [number + ' दिसांनी', number + ' दीस'],
24 M: ['एका म्हयन्यान', 'एक म्हयनो'],
25 MM: [number + ' म्हयन्यानी', number + ' म्हयने'],
26 y: ['एका वर्सान', 'एक वर्स'],
27 yy: [number + ' वर्सांनी', number + ' वर्सां'],
28 };
29 return isFuture ? format[key][0] : format[key][1];
30 }
31
32 var gomDeva = moment.defineLocale('gom-deva', {
33 months: {
34 standalone: 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
35 '_'
36 ),
37 format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
38 '_'
39 ),
40 isFormat: /MMMM(\s)+D[oD]?/,
41 },
42 monthsShort: 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
43 '_'
44 ),
45 monthsParseExact: true,
46 weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
47 weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
48 weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
49 weekdaysParseExact: true,
50 longDateFormat: {
51 LT: 'A h:mm [वाजतां]',
52 LTS: 'A h:mm:ss [वाजतां]',
53 L: 'DD-MM-YYYY',
54 LL: 'D MMMM YYYY',
55 LLL: 'D MMMM YYYY A h:mm [वाजतां]',
56 LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
57 llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',
58 },
59 calendar: {
60 sameDay: '[आयज] LT',
61 nextDay: '[फाल्यां] LT',
62 nextWeek: '[फुडलो] dddd[,] LT',
63 lastDay: '[काल] LT',
64 lastWeek: '[फाटलो] dddd[,] LT',
65 sameElse: 'L',
66 },
67 relativeTime: {
68 future: '%s',
69 past: '%s आदीं',
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}(वेर)/,
84 ordinal: function (number, period) {
85 switch (period) {
86 // the ordinal 'वेर' only applies to day of the month
87 case 'D':
88 return number + 'वेर';
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: /राती|सकाळीं|दनपारां|सांजे/,
104 meridiemHour: function (hour, meridiem) {
105 if (hour === 12) {
106 hour = 0;
107 }
108 if (meridiem === 'राती') {
109 return hour < 4 ? hour : hour + 12;
110 } else if (meridiem === 'सकाळीं') {
111 return hour;
112 } else if (meridiem === 'दनपारां') {
113 return hour > 12 ? hour : hour + 12;
114 } else if (meridiem === 'सांजे') {
115 return hour + 12;
116 }
117 },
118 meridiem: function (hour, minute, isLower) {
119 if (hour < 4) {
120 return 'राती';
121 } else if (hour < 12) {
122 return 'सकाळीं';
123 } else if (hour < 16) {
124 return 'दनपारां';
125 } else if (hour < 20) {
126 return 'सांजे';
127 } else {
128 return 'राती';
129 }
130 },
131 });
132
133 return gomDeva;
134
135})));