1 //! moment.js locale configuration
2 //! locale : Gujarati [gu]
3 //! author : Kaushik Thanki : https://github.com/Kaushik1987
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
) :
10 }(this, (function (moment
) { 'use strict';
38 var gu
= moment
.defineLocale('gu', {
39 months
: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'),
40 monthsShort
: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'),
41 monthsParseExact
: true,
42 weekdays
: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'),
43 weekdaysShort
: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
44 weekdaysMin
: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
47 LTS
: 'A h:mm:ss વાગ્યે',
50 LLL
: 'D MMMM YYYY, A h:mm વાગ્યે',
51 LLLL
: 'dddd, D MMMM YYYY, A h:mm વાગ્યે'
57 lastDay
: '[ગઇકાલે] LT',
58 lastWeek
: '[પાછલા] dddd, LT',
76 preparse: function (string
) {
77 return string
.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match
) {
78 return numberMap
[match
];
81 postformat: function (string
) {
82 return string
.replace(/\d/g, function (match
) {
83 return symbolMap
[match
];
86 // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
87 // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
88 meridiemParse
: /રાત|બપોર|સવાર|સાંજ/,
89 meridiemHour: function (hour
, meridiem
) {
93 if (meridiem
=== 'રાત') {
94 return hour
< 4 ? hour
: hour
+ 12;
95 } else if (meridiem
=== 'સવાર') {
97 } else if (meridiem
=== 'બપોર') {
98 return hour
>= 10 ? hour
: hour
+ 12;
99 } else if (meridiem
=== 'સાંજ') {
103 meridiem: function (hour
, minute
, isLower
) {
106 } else if (hour
< 10) {
108 } else if (hour
< 17) {
110 } else if (hour
< 20) {
117 dow
: 0, // Sunday is the first day of the week.
118 doy
: 6 // The week that contains Jan 1st is the first week of the year.