X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=resources%2Flib%2Fmoment%2Flocale%2Fbn.js;h=1d49751132ed3dea93526263dd1f3038f9dfca1b;hp=59d26baaeb17ad4532a22b62f5d1a37de52278ac;hb=c584722cc2e3d33edae58d46c2149063b3fc6d72;hpb=75d8b6c6cd2b70d98242e1246678c12e973a5dfa diff --git a/resources/lib/moment/locale/bn.js b/resources/lib/moment/locale/bn.js index 59d26baaeb..1d49751132 100644 --- a/resources/lib/moment/locale/bn.js +++ b/resources/lib/moment/locale/bn.js @@ -1,18 +1,15 @@ -// moment.js locale configuration -// locale : Bengali (bn) -// author : Kaushik Gandhi : https://github.com/kaushikgandhi +//! moment.js locale configuration +//! locale : Bengali [bn] +//! author : Kaushik Gandhi : https://github.com/kaushikgandhi + +;(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 (factory) { - // Comment out broken wrapper, see T145382 - /*if (typeof define === 'function' && define.amd) { - define(['moment'], factory); // AMD - } else if (typeof exports === 'object') { - module.exports = factory(require('../moment')); // Node - } else { - factory((typeof global !== 'undefined' ? global : this).moment); // node or other global - }*/ - factory(this.moment); -}(function (moment) { var symbolMap = { '1': '১', '2': '২', @@ -38,19 +35,19 @@ '০': '0' }; - return moment.defineLocale('bn', { - months : 'জানুয়ারী_ফেবুয়ারী_মার্চ_এপ্রিল_মে_জুন_জুলাই_অগাস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'), - monthsShort : 'জানু_ফেব_মার্চ_এপর_মে_জুন_জুল_অগ_সেপ্ট_অক্টো_নভ_ডিসেম্'.split('_'), - weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পত্তিবার_শুক্রুবার_শনিবার'.split('_'), - weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পত্তি_শুক্রু_শনি'.split('_'), - weekdaysMin : 'রব_সম_মঙ্গ_বু_ব্রিহ_শু_শনি'.split('_'), + var bn = moment.defineLocale('bn', { + months : 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'), + monthsShort : 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'), + weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'), + weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'), + weekdaysMin : 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'), longDateFormat : { LT : 'A h:mm সময়', LTS : 'A h:mm:ss সময়', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', - LLL : 'D MMMM YYYY, LT', - LLLL : 'dddd, D MMMM YYYY, LT' + LLL : 'D MMMM YYYY, A h:mm সময়', + LLLL : 'dddd, D MMMM YYYY, A h:mm সময়' }, calendar : { sameDay : '[আজ] LT', @@ -63,7 +60,7 @@ relativeTime : { future : '%s পরে', past : '%s আগে', - s : 'কএক সেকেন্ড', + s : 'কয়েক সেকেন্ড', m : 'এক মিনিট', mm : '%d মিনিট', h : 'এক ঘন্টা', @@ -85,18 +82,28 @@ return symbolMap[match]; }); }, - //Bengali is a vast language its spoken - //in different forms in various parts of the world. - //I have just generalized with most common one used + meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'রাত' && hour >= 4) || + (meridiem === 'দুপুর' && hour < 5) || + meridiem === 'বিকাল') { + return hour + 12; + } else { + return hour; + } + }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'রাত'; } else if (hour < 10) { - return 'শকাল'; + return 'সকাল'; } else if (hour < 17) { return 'দুপুর'; } else if (hour < 20) { - return 'বিকেল'; + return 'বিকাল'; } else { return 'রাত'; } @@ -106,4 +113,7 @@ doy : 6 // The week that contains Jan 1st is the first week of the year. } }); -})); + + return bn; + +})); \ No newline at end of file