vendor/assets/javascripts/moment/bs.js in momentjs-middleman-2.6.1 vs vendor/assets/javascripts/moment/bs.js in momentjs-middleman-2.13.0

- old
+ new

@@ -1,22 +1,20 @@ -// moment.js language configuration -// language : bosnian (bs) -// author : Nedim Cholich : https://github.com/frontyard -// based on (hr) translation by Bojan Marković +//! moment.js locale configuration +//! locale : bosnian (bs) +//! author : Nedim Cholich : https://github.com/frontyard +//! based on (hr) translation by Bojan Marković -(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'; + function translate(number, withoutSuffix, key) { - var result = number + " "; + var result = number + ' '; switch (key) { case 'm': return withoutSuffix ? 'jedna minuta' : 'jedne minute'; case 'mm': if (number === 1) { @@ -64,27 +62,29 @@ } return result; } } - return moment.lang('bs', { - months : "januar_februar_mart_april_maj_juni_juli_avgust_septembar_oktobar_novembar_decembar".split("_"), - monthsShort : "jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"), - weekdays : "nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"), - weekdaysShort : "ned._pon._uto._sri._čet._pet._sub.".split("_"), - weekdaysMin : "ne_po_ut_sr_če_pe_su".split("_"), + var bs = moment.defineLocale('bs', { + months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'), + monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'), + monthsParseExact: true, + weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort : 'ned._pon._uto._sri._č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] [nedjelju] [u] LT'; case 3: @@ -114,26 +114,30 @@ } }, sameElse : 'L' }, relativeTime : { - future : "za %s", - past : "prije %s", - s : "par sekundi", + future : 'za %s', + past : 'prije %s', + s : 'par sekundi', m : translate, mm : translate, h : translate, hh : translate, - d : "dan", + d : 'dan', dd : translate, - M : "mjesec", + M : 'mjesec', MM : translate, - y : "godinu", + y : 'godinu', yy : 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 bs; + +})); \ No newline at end of file