2019-06-10 15:38:54 +00:00
|
|
|
|
//! moment.js locale configuration
|
2020-07-23 21:12:30 +00:00
|
|
|
|
//! locale : Gujarati [gu]
|
|
|
|
|
//! author : Kaushik Thanki : https://github.com/Kaushik1987
|
2019-06-10 15:38:54 +00:00
|
|
|
|
|
|
|
|
|
;(function (global, factory) {
|
|
|
|
|
typeof exports === 'object' && typeof module !== 'undefined'
|
|
|
|
|
&& typeof require === 'function' ? factory(require('../moment')) :
|
|
|
|
|
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
|
|
|
|
factory(global.moment)
|
|
|
|
|
}(this, (function (moment) { 'use strict';
|
|
|
|
|
|
2020-07-23 21:12:30 +00:00
|
|
|
|
//! moment.js locale configuration
|
2019-06-10 15:38:54 +00:00
|
|
|
|
|
|
|
|
|
var symbolMap = {
|
2020-11-24 07:16:03 +00:00
|
|
|
|
1: '૧',
|
|
|
|
|
2: '૨',
|
|
|
|
|
3: '૩',
|
|
|
|
|
4: '૪',
|
|
|
|
|
5: '૫',
|
|
|
|
|
6: '૬',
|
|
|
|
|
7: '૭',
|
|
|
|
|
8: '૮',
|
|
|
|
|
9: '૯',
|
|
|
|
|
0: '૦',
|
2019-06-10 15:38:54 +00:00
|
|
|
|
},
|
|
|
|
|
numberMap = {
|
|
|
|
|
'૧': '1',
|
|
|
|
|
'૨': '2',
|
|
|
|
|
'૩': '3',
|
|
|
|
|
'૪': '4',
|
|
|
|
|
'૫': '5',
|
|
|
|
|
'૬': '6',
|
|
|
|
|
'૭': '7',
|
|
|
|
|
'૮': '8',
|
|
|
|
|
'૯': '9',
|
2020-07-23 21:12:30 +00:00
|
|
|
|
'૦': '0',
|
2019-06-10 15:38:54 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var gu = moment.defineLocale('gu', {
|
2020-07-23 21:12:30 +00:00
|
|
|
|
months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(
|
|
|
|
|
'_'
|
|
|
|
|
),
|
|
|
|
|
monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(
|
|
|
|
|
'_'
|
|
|
|
|
),
|
2019-06-10 15:38:54 +00:00
|
|
|
|
monthsParseExact: true,
|
2020-07-23 21:12:30 +00:00
|
|
|
|
weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(
|
|
|
|
|
'_'
|
|
|
|
|
),
|
2019-06-10 15:38:54 +00:00
|
|
|
|
weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
|
|
|
|
|
weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
|
|
|
|
|
longDateFormat: {
|
|
|
|
|
LT: 'A h:mm વાગ્યે',
|
|
|
|
|
LTS: 'A h:mm:ss વાગ્યે',
|
|
|
|
|
L: 'DD/MM/YYYY',
|
|
|
|
|
LL: 'D MMMM YYYY',
|
|
|
|
|
LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
|
2020-07-23 21:12:30 +00:00
|
|
|
|
LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',
|
2019-06-10 15:38:54 +00:00
|
|
|
|
},
|
|
|
|
|
calendar: {
|
|
|
|
|
sameDay: '[આજ] LT',
|
|
|
|
|
nextDay: '[કાલે] LT',
|
|
|
|
|
nextWeek: 'dddd, LT',
|
|
|
|
|
lastDay: '[ગઇકાલે] LT',
|
|
|
|
|
lastWeek: '[પાછલા] dddd, LT',
|
2020-07-23 21:12:30 +00:00
|
|
|
|
sameElse: 'L',
|
2019-06-10 15:38:54 +00:00
|
|
|
|
},
|
|
|
|
|
relativeTime: {
|
|
|
|
|
future: '%s મા',
|
2020-07-23 21:12:30 +00:00
|
|
|
|
past: '%s પહેલા',
|
2019-06-10 15:38:54 +00:00
|
|
|
|
s: 'અમુક પળો',
|
|
|
|
|
ss: '%d સેકંડ',
|
|
|
|
|
m: 'એક મિનિટ',
|
|
|
|
|
mm: '%d મિનિટ',
|
|
|
|
|
h: 'એક કલાક',
|
|
|
|
|
hh: '%d કલાક',
|
|
|
|
|
d: 'એક દિવસ',
|
|
|
|
|
dd: '%d દિવસ',
|
|
|
|
|
M: 'એક મહિનો',
|
|
|
|
|
MM: '%d મહિનો',
|
|
|
|
|
y: 'એક વર્ષ',
|
2020-07-23 21:12:30 +00:00
|
|
|
|
yy: '%d વર્ષ',
|
2019-06-10 15:38:54 +00:00
|
|
|
|
},
|
|
|
|
|
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];
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// Gujarati notation for meridiems are quite fuzzy in practice. While there exists
|
|
|
|
|
// a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
|
|
|
|
|
meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
|
|
|
|
|
meridiemHour: function (hour, meridiem) {
|
|
|
|
|
if (hour === 12) {
|
|
|
|
|
hour = 0;
|
|
|
|
|
}
|
|
|
|
|
if (meridiem === 'રાત') {
|
|
|
|
|
return hour < 4 ? hour : hour + 12;
|
|
|
|
|
} else if (meridiem === 'સવાર') {
|
|
|
|
|
return hour;
|
|
|
|
|
} else if (meridiem === 'બપોર') {
|
|
|
|
|
return hour >= 10 ? hour : hour + 12;
|
|
|
|
|
} else if (meridiem === 'સાંજ') {
|
|
|
|
|
return hour + 12;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
meridiem: function (hour, minute, isLower) {
|
|
|
|
|
if (hour < 4) {
|
|
|
|
|
return 'રાત';
|
|
|
|
|
} else if (hour < 10) {
|
|
|
|
|
return 'સવાર';
|
|
|
|
|
} else if (hour < 17) {
|
|
|
|
|
return 'બપોર';
|
|
|
|
|
} else if (hour < 20) {
|
|
|
|
|
return 'સાંજ';
|
|
|
|
|
} else {
|
|
|
|
|
return 'રાત';
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
week: {
|
|
|
|
|
dow: 0, // Sunday is the first day of the week.
|
2020-07-23 21:12:30 +00:00
|
|
|
|
doy: 6, // The week that contains Jan 6th is the first week of the year.
|
|
|
|
|
},
|
2019-06-10 15:38:54 +00:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return gu;
|
|
|
|
|
|
|
|
|
|
})));
|