UNPKG

6.34 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:
35 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(
36 '_'
37 ),
38 format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(
39 '_'
40 ),
41 isFormat: /MMMM(\s)+D[oD]?/,
42 },
43 monthsShort:
44 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(
45 '_'
46 ),
47 monthsParseExact: true,
48 weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),
49 weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),
50 weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),
51 weekdaysParseExact: true,
52 longDateFormat: {
53 LT: 'A h:mm [वाजतां]',
54 LTS: 'A h:mm:ss [वाजतां]',
55 L: 'DD-MM-YYYY',
56 LL: 'D MMMM YYYY',
57 LLL: 'D MMMM YYYY A h:mm [वाजतां]',
58 LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',
59 llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',
60 },
61 calendar: {
62 sameDay: '[आयज] LT',
63 nextDay: '[फाल्यां] LT',
64 nextWeek: '[फुडलो] dddd[,] LT',
65 lastDay: '[काल] LT',
66 lastWeek: '[फाटलो] dddd[,] LT',
67 sameElse: 'L',
68 },
69 relativeTime: {
70 future: '%s',
71 past: '%s आदीं',
72 s: processRelativeTime,
73 ss: processRelativeTime,
74 m: processRelativeTime,
75 mm: processRelativeTime,
76 h: processRelativeTime,
77 hh: processRelativeTime,
78 d: processRelativeTime,
79 dd: processRelativeTime,
80 M: processRelativeTime,
81 MM: processRelativeTime,
82 y: processRelativeTime,
83 yy: processRelativeTime,
84 },
85 dayOfMonthOrdinalParse: /\d{1,2}(वेर)/,
86 ordinal: function (number, period) {
87 switch (period) {
88 // the ordinal 'वेर' only applies to day of the month
89 case 'D':
90 return number + 'वेर';
91 default:
92 case 'M':
93 case 'Q':
94 case 'DDD':
95 case 'd':
96 case 'w':
97 case 'W':
98 return number;
99 }
100 },
101 week: {
102 dow: 0, // Sunday is the first day of the week
103 doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)
104 },
105 meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,
106 meridiemHour: function (hour, meridiem) {
107 if (hour === 12) {
108 hour = 0;
109 }
110 if (meridiem === 'राती') {
111 return hour < 4 ? hour : hour + 12;
112 } else if (meridiem === 'सकाळीं') {
113 return hour;
114 } else if (meridiem === 'दनपारां') {
115 return hour > 12 ? hour : hour + 12;
116 } else if (meridiem === 'सांजे') {
117 return hour + 12;
118 }
119 },
120 meridiem: function (hour, minute, isLower) {
121 if (hour < 4) {
122 return 'राती';
123 } else if (hour < 12) {
124 return 'सकाळीं';
125 } else if (hour < 16) {
126 return 'दनपारां';
127 } else if (hour < 20) {
128 return 'सांजे';
129 } else {
130 return 'राती';
131 }
132 },
133 });
134
135 return gomDeva;
136
137})));