LaravelTest
132 строки · 4.8 Кб
1//! moment.js locale configuration
2//! locale : Gujarati [gu]
3//! author : Kaushik Thanki : https://github.com/Kaushik1987
4
5;(function (global, factory) {6typeof exports === 'object' && typeof module !== 'undefined'7&& typeof require === 'function' ? factory(require('../moment')) :8typeof define === 'function' && define.amd ? define(['../moment'], factory) :9factory(global.moment)10}(this, (function (moment) { 'use strict';11
12//! moment.js locale configuration13
14var symbolMap = {151: '૧',162: '૨',173: '૩',184: '૪',195: '૫',206: '૬',217: '૭',228: '૮',239: '૯',240: '૦',25},26numberMap = {27'૧': '1',28'૨': '2',29'૩': '3',30'૪': '4',31'૫': '5',32'૬': '6',33'૭': '7',34'૮': '8',35'૯': '9',36'૦': '0',37};38
39var gu = moment.defineLocale('gu', {40months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(41'_'42),43monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(44'_'45),46monthsParseExact: true,47weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(48'_'49),50weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),51weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),52longDateFormat: {53LT: 'A h:mm વાગ્યે',54LTS: 'A h:mm:ss વાગ્યે',55L: 'DD/MM/YYYY',56LL: 'D MMMM YYYY',57LLL: 'D MMMM YYYY, A h:mm વાગ્યે',58LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',59},60calendar: {61sameDay: '[આજ] LT',62nextDay: '[કાલે] LT',63nextWeek: 'dddd, LT',64lastDay: '[ગઇકાલે] LT',65lastWeek: '[પાછલા] dddd, LT',66sameElse: 'L',67},68relativeTime: {69future: '%s મા',70past: '%s પહેલા',71s: 'અમુક પળો',72ss: '%d સેકંડ',73m: 'એક મિનિટ',74mm: '%d મિનિટ',75h: 'એક કલાક',76hh: '%d કલાક',77d: 'એક દિવસ',78dd: '%d દિવસ',79M: 'એક મહિનો',80MM: '%d મહિનો',81y: 'એક વર્ષ',82yy: '%d વર્ષ',83},84preparse: function (string) {85return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {86return numberMap[match];87});88},89postformat: function (string) {90return string.replace(/\d/g, function (match) {91return symbolMap[match];92});93},94// Gujarati notation for meridiems are quite fuzzy in practice. While there exists95// a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.96meridiemParse: /રાત|બપોર|સવાર|સાંજ/,97meridiemHour: function (hour, meridiem) {98if (hour === 12) {99hour = 0;100}101if (meridiem === 'રાત') {102return hour < 4 ? hour : hour + 12;103} else if (meridiem === 'સવાર') {104return hour;105} else if (meridiem === 'બપોર') {106return hour >= 10 ? hour : hour + 12;107} else if (meridiem === 'સાંજ') {108return hour + 12;109}110},111meridiem: function (hour, minute, isLower) {112if (hour < 4) {113return 'રાત';114} else if (hour < 10) {115return 'સવાર';116} else if (hour < 17) {117return 'બપોર';118} else if (hour < 20) {119return 'સાંજ';120} else {121return 'રાત';122}123},124week: {125dow: 0, // Sunday is the first day of the week.126doy: 6, // The week that contains Jan 6th is the first week of the year.127},128});129
130return gu;131
132})));133