vendor/assets/javascripts/moment/sr.js in momentjs-middleman-2.6.1 vs vendor/assets/javascripts/moment/sr.js in momentjs-middleman-2.13.0
- old
+ new
@@ -1,19 +1,17 @@
-// moment.js language configuration
-// language : Serbian-latin (sr)
-// author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
+//! moment.js locale configuration
+//! locale : Serbian-latin (sr)
+//! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
-(function (factory) {
- if (typeof define === 'function' && define.amd) {
- define(['moment'], factory); // AMD
- } else if (typeof exports === 'object') {
- module.exports = factory(require('../moment')); // Node
- } else {
- factory(window.moment); // Browser global
- }
-}(function (moment) {
+;(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';
+
var translator = {
words: { //Different grammatical cases
m: ['jedan minut', 'jedne minute'],
mm: ['minut', 'minute', 'minuta'],
h: ['jedan sat', 'jednog sata'],
@@ -33,27 +31,29 @@
return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
}
}
};
- return moment.lang('sr', {
- months: ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'],
- monthsShort: ['jan.', 'feb.', 'mar.', 'apr.', 'maj', 'jun', 'jul', 'avg.', 'sep.', 'okt.', 'nov.', 'dec.'],
- weekdays: ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'],
- weekdaysShort: ['ned.', 'pon.', 'uto.', 'sre.', 'čet.', 'pet.', 'sub.'],
- weekdaysMin: ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su'],
+ var sr = moment.defineLocale('sr', {
+ months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),
+ monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
+ monthsParseExact: true,
+ weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),
+ weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
+ weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
+ weekdaysParseExact : true,
longDateFormat: {
- LT: "H:mm",
- L: "DD. MM. YYYY",
- LL: "D. MMMM YYYY",
- LLL: "D. MMMM YYYY LT",
- LLLL: "dddd, D. MMMM YYYY LT"
+ LT: 'H:mm',
+ LTS : 'H:mm:ss',
+ L: 'DD. MM. YYYY',
+ LL: 'D. MMMM YYYY',
+ LLL: 'D. MMMM YYYY H:mm',
+ LLLL: 'dddd, D. MMMM YYYY H:mm'
},
calendar: {
sameDay: '[danas u] LT',
nextDay: '[sutra u] LT',
-
nextWeek: function () {
switch (this.day()) {
case 0:
return '[u] [nedelju] [u] LT';
case 3:
@@ -81,26 +81,30 @@
return lastWeekDays[this.day()];
},
sameElse : 'L'
},
relativeTime : {
- future : "za %s",
- past : "pre %s",
- s : "nekoliko sekundi",
+ future : 'za %s',
+ past : 'pre %s',
+ s : 'nekoliko sekundi',
m : translator.translate,
mm : translator.translate,
h : translator.translate,
hh : translator.translate,
- d : "dan",
+ d : 'dan',
dd : translator.translate,
- M : "mesec",
+ M : 'mesec',
MM : translator.translate,
- y : "godinu",
+ y : 'godinu',
yy : translator.translate
},
+ ordinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return sr;
+
+}));
\ No newline at end of file