LaravelTest
129 строк · 4.3 Кб
1//! moment.js locale configuration
2//! locale : Montenegrin [me]
3//! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac
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 translator = {15words: {16//Different grammatical cases17ss: ['sekund', 'sekunda', 'sekundi'],18m: ['jedan minut', 'jednog minuta'],19mm: ['minut', 'minuta', 'minuta'],20h: ['jedan sat', 'jednog sata'],21hh: ['sat', 'sata', 'sati'],22dd: ['dan', 'dana', 'dana'],23MM: ['mjesec', 'mjeseca', 'mjeseci'],24yy: ['godina', 'godine', 'godina'],25},26correctGrammaticalCase: function (number, wordKey) {27return number === 128? wordKey[0]29: number >= 2 && number <= 430? wordKey[1]31: wordKey[2];32},33translate: function (number, withoutSuffix, key) {34var wordKey = translator.words[key];35if (key.length === 1) {36return withoutSuffix ? wordKey[0] : wordKey[1];37} else {38return (39number +40' ' +41translator.correctGrammaticalCase(number, wordKey)42);43}44},45};46
47var me = moment.defineLocale('me', {48months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(49'_'50),51monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split(52'_'53),54monthsParseExact: true,55weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(56'_'57),58weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),59weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),60weekdaysParseExact: true,61longDateFormat: {62LT: 'H:mm',63LTS: 'H:mm:ss',64L: 'DD.MM.YYYY',65LL: 'D. MMMM YYYY',66LLL: 'D. MMMM YYYY H:mm',67LLLL: 'dddd, D. MMMM YYYY H:mm',68},69calendar: {70sameDay: '[danas u] LT',71nextDay: '[sjutra u] LT',72
73nextWeek: function () {74switch (this.day()) {75case 0:76return '[u] [nedjelju] [u] LT';77case 3:78return '[u] [srijedu] [u] LT';79case 6:80return '[u] [subotu] [u] LT';81case 1:82case 2:83case 4:84case 5:85return '[u] dddd [u] LT';86}87},88lastDay: '[juče u] LT',89lastWeek: function () {90var lastWeekDays = [91'[prošle] [nedjelje] [u] LT',92'[prošlog] [ponedjeljka] [u] LT',93'[prošlog] [utorka] [u] LT',94'[prošle] [srijede] [u] LT',95'[prošlog] [četvrtka] [u] LT',96'[prošlog] [petka] [u] LT',97'[prošle] [subote] [u] LT',98];99return lastWeekDays[this.day()];100},101sameElse: 'L',102},103relativeTime: {104future: 'za %s',105past: 'prije %s',106s: 'nekoliko sekundi',107ss: translator.translate,108m: translator.translate,109mm: translator.translate,110h: translator.translate,111hh: translator.translate,112d: 'dan',113dd: translator.translate,114M: 'mjesec',115MM: translator.translate,116y: 'godinu',117yy: translator.translate,118},119dayOfMonthOrdinalParse: /\d{1,2}\./,120ordinal: '%d.',121week: {122dow: 1, // Monday is the first day of the week.123doy: 7, // The week that contains Jan 7th is the first week of the year.124},125});126
127return me;128
129})));130