1// moment.js locale configuration 2// locale : Bengali (bn) 3// author : Kaushik Gandhi : https://github.com/kaushikgandhi 4 5(function (factory) { 6 if (typeof define === 'function' && define.amd) { 7 define(['moment'], factory); // AMD 8 } else if (typeof exports === 'object') { 9 module.exports = factory(require('../moment')); // Node 10 } else { 11 factory((typeof global !== 'undefined' ? global : this).moment); // node or other global 12 } 13}(function (moment) { 14 var symbolMap = { 15 '1': 'à§§', 16 '2': '২', 17 '3': 'à§©', 18 '4': '৪', 19 '5': 'à§«', 20 '6': '৬', 21 '7': 'à§', 22 '8': 'à§®', 23 '9': '৯', 24 '0': '০' 25 }, 26 numberMap = { 27 'à§§': '1', 28 '২': '2', 29 'à§©': '3', 30 '৪': '4', 31 'à§«': '5', 32 '৬': '6', 33 'à§': '7', 34 'à§®': '8', 35 '৯': '9', 36 '০': '0' 37 }; 38 39 return moment.defineLocale('bn', { 40 months : 'à¦à¦¾à¦¨à§à§à¦¾à¦°à§_ফà§à¦¬à§à§à¦¾à¦°à§_মারà§à¦_à¦à¦ªà§à¦°à¦¿à¦²_মà§_à¦à§à¦¨_à¦à§à¦²à¦¾à¦_ঠà¦à¦¾à¦¸à§à¦_সà§à¦ªà§à¦à§à¦®à§à¦¬à¦°_ঠà¦à§à¦à§à¦¬à¦°_নà¦à§à¦®à§à¦¬à¦°_ডিসà§à¦®à§à¦¬à¦°'.split('_'), 41 monthsShort : 'à¦à¦¾à¦¨à§_ফà§à¦¬_মারà§à¦_à¦à¦ªà¦°_মà§_à¦à§à¦¨_à¦à§à¦²_ঠà¦_সà§à¦ªà§à¦_ঠà¦à§à¦à§_নà¦_ডিসà§à¦®à§'.split('_'), 42 weekdays : 'রবিবার_সà§à¦®à¦¬à¦¾à¦°_মà¦à§à¦à¦²à¦¬à¦¾à¦°_বà§à¦§à¦¬à¦¾à¦°_বà§à¦¹à¦¸à§à¦ªà¦¤à§à¦¤à¦¿à¦¬à¦¾à¦°_শà§à¦à§à¦°à§à¦¬à¦¾à¦°_শনিবার'.split('_'), 43 weekdaysShort : 'রবি_সà§à¦®_মà¦à§à¦à¦²_বà§à¦§_বà§à¦¹à¦¸à§à¦ªà¦¤à§à¦¤à¦¿_শà§à¦à§à¦°à§_শনি'.split('_'), 44 weekdaysMin : 'রব_সম_মà¦à§à¦_বà§_বà§à¦°à¦¿à¦¹_শà§_শনি'.split('_'), 45 longDateFormat : { 46 LT : 'A h:mm সমà§', 47 LTS : 'A h:mm:ss সমà§', 48 L : 'DD/MM/YYYY', 49 LL : 'D MMMM YYYY', 50 LLL : 'D MMMM YYYY, LT', 51 LLLL : 'dddd, D MMMM YYYY, LT' 52 }, 53 calendar : { 54 sameDay : '[à¦à¦] LT', 55 nextDay : '[à¦à¦à¦¾à¦®à§à¦à¦¾à¦²] LT', 56 nextWeek : 'dddd, LT', 57 lastDay : '[à¦à¦¤à¦à¦¾à¦²] LT', 58 lastWeek : '[à¦à¦¤] dddd, LT', 59 sameElse : 'L' 60 }, 61 relativeTime : { 62 future : '%s পরà§', 63 past : '%s à¦à¦à§', 64 s : 'à¦à¦à¦ সà§à¦à§à¦¨à§à¦¡', 65 m : 'à¦à¦ মিনিà¦', 66 mm : '%d মিনিà¦', 67 h : 'à¦à¦ à¦à¦¨à§à¦à¦¾', 68 hh : '%d à¦à¦¨à§à¦à¦¾', 69 d : 'à¦à¦ দিন', 70 dd : '%d দিন', 71 M : 'à¦à¦ মাস', 72 MM : '%d মাস', 73 y : 'à¦à¦ বà¦à¦°', 74 yy : '%d বà¦à¦°' 75 }, 76 preparse: function (string) { 77 return string.replace(/[১২৩৪৫৬à§à§®à§¯à§¦]/g, function (match) { 78 return numberMap[match]; 79 }); 80 }, 81 postformat: function (string) { 82 return string.replace(/\d/g, function (match) { 83 return symbolMap[match]; 84 }); 85 }, 86 //Bengali is a vast language its spoken 87 //in different forms in various parts of the world. 88 //I have just generalized with most common one used 89 meridiem : function (hour, minute, isLower) { 90 if (hour < 4) { 91 return 'রাত'; 92 } else if (hour < 10) { 93 return 'শà¦à¦¾à¦²'; 94 } else if (hour < 17) { 95 return 'দà§à¦ªà§à¦°'; 96 } else if (hour < 20) { 97 return 'বিà¦à§à¦²'; 98 } else { 99 return 'রাত'; 100 } 101 }, 102 week : { 103 dow : 0, // Sunday is the first day of the week. 104 doy : 6 // The week that contains Jan 1st is the first week of the year. 105 } 106 }); 107}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.