X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Flib%2Fmoment%2Flocale%2Fml.js;h=487b37a63884dca5c5914377760bcc5c7f70e828;hb=434ff86050115d4e1e3d61a23754815ebd7aeac6;hp=f72b2c40ba06b6a3878f256ec35a0a5d66fc8b01;hpb=bae9c5aca69c62ff8ae32956a082c0787cb06b73;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/lib/moment/locale/ml.js b/resources/lib/moment/locale/ml.js index f72b2c40ba..487b37a638 100644 --- a/resources/lib/moment/locale/ml.js +++ b/resources/lib/moment/locale/ml.js @@ -1,21 +1,19 @@ -// moment.js locale configuration -// locale : malayalam (ml) -// author : Floyd Pink : https://github.com/floydpink +//! moment.js locale configuration +//! locale : Malayalam [ml] +//! author : Floyd Pink : https://github.com/floydpink -(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) { - return moment.defineLocale('ml', { +;(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 ml = moment.defineLocale('ml', { months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'), monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'), + monthsParseExact : true, weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'), weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), @@ -24,8 +22,8 @@ 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', @@ -50,6 +48,19 @@ y : 'ഒരു വർഷം', yy : '%d വർഷം' }, + meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i, + meridiemHour : function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ((meridiem === 'രാത്രി' && hour >= 4) || + meridiem === 'ഉച്ച കഴിഞ്ഞ്' || + meridiem === 'വൈകുന്നേരം') { + return hour + 12; + } else { + return hour; + } + }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'രാത്രി'; @@ -64,4 +75,7 @@ } } }); -})); + + return ml; + +})); \ No newline at end of file