aboutsummaryrefslogtreecommitdiffstats
path: root/resources/lib/moment/locale/ms-my.js
diff options
context:
space:
mode:
authorJames D. Forrester <jforrester@wikimedia.org>2016-09-13 11:24:47 -0700
committerRoan Kattouw <roan.kattouw@gmail.com>2017-02-08 20:17:46 +0000
commitf13a0d952187d89e565c0551bd1bf147931ece38 (patch)
tree01190509d5b86a47a8e510e10324110d813167fa /resources/lib/moment/locale/ms-my.js
parent263168d3ae058f0ecd9d9ef50f3cb1e64cf2fc6b (diff)
downloadmediawikicore-f13a0d952187d89e565c0551bd1bf147931ece38.tar.gz
mediawikicore-f13a0d952187d89e565c0551bd1bf147931ece38.zip
resources: Bump moment.js from 2.8.4 to 2.15.0
Languages and locales now with support: * aeb-arab * dv * fy * gd * jv * kk-cyrl * ky * lo * ms * pa * se * si * ss * sw * te * zh-hk Skipped languages because we don't support them in MW: * ar-ly * en-ie * en-nz * es-do * fr-ch * me * tlh * tzl Change-Id: I7f89569c6ee6640d368af1378e84c5a9e725da0d
Diffstat (limited to 'resources/lib/moment/locale/ms-my.js')
-rw-r--r--resources/lib/moment/locale/ms-my.js52
1 files changed, 33 insertions, 19 deletions
diff --git a/resources/lib/moment/locale/ms-my.js b/resources/lib/moment/locale/ms-my.js
index 7072c2f289bf..e353173a912b 100644
--- a/resources/lib/moment/locale/ms-my.js
+++ b/resources/lib/moment/locale/ms-my.js
@@ -1,19 +1,17 @@
-// moment.js locale configuration
-// locale : Bahasa Malaysia (ms-MY)
-// author : Weldan Jamili : https://github.com/weldan
+//! moment.js locale configuration
+//! locale : Malay [ms-my]
+//! note : DEPRECATED, the correct one is [ms]
+//! author : Weldan Jamili : https://github.com/weldan
-(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('ms-my', {
+;(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 ms_my = moment.defineLocale('ms-my', {
months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
@@ -21,11 +19,24 @@
weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
longDateFormat : {
LT : 'HH.mm',
- LTS : 'LT.ss',
+ LTS : 'HH.mm.ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
- LLL : 'D MMMM YYYY [pukul] LT',
- LLLL : 'dddd, D MMMM YYYY [pukul] LT'
+ LLL : 'D MMMM YYYY [pukul] HH.mm',
+ LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
+ },
+ meridiemParse: /pagi|tengahari|petang|malam/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === 'pagi') {
+ return hour;
+ } else if (meridiem === 'tengahari') {
+ return hour >= 11 ? hour : hour + 12;
+ } else if (meridiem === 'petang' || meridiem === 'malam') {
+ return hour + 12;
+ }
},
meridiem : function (hours, minutes, isLower) {
if (hours < 11) {
@@ -66,4 +77,7 @@
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
-}));
+
+ return ms_my;
+
+})); \ No newline at end of file