2014-09-30 12:29:53 +02:00
|
|
|
// moment.js locale configuration
|
|
|
|
// locale : Bahasa Malaysia (ms-MY)
|
2014-07-31 18:00:20 +02:00
|
|
|
// author : Weldan Jamili : https://github.com/weldan
|
|
|
|
|
|
|
|
(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) {
|
2014-09-30 12:29:53 +02:00
|
|
|
return 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('_'),
|
|
|
|
weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
|
|
|
|
weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
|
2014-07-31 18:00:20 +02:00
|
|
|
longDateFormat : {
|
2014-09-30 12:29:53 +02:00
|
|
|
LT : 'HH.mm',
|
|
|
|
L : 'DD/MM/YYYY',
|
|
|
|
LL : 'D MMMM YYYY',
|
|
|
|
LLL : 'D MMMM YYYY [pukul] LT',
|
|
|
|
LLLL : 'dddd, D MMMM YYYY [pukul] LT'
|
2014-07-31 18:00:20 +02:00
|
|
|
},
|
|
|
|
meridiem : function (hours, minutes, isLower) {
|
|
|
|
if (hours < 11) {
|
|
|
|
return 'pagi';
|
|
|
|
} else if (hours < 15) {
|
|
|
|
return 'tengahari';
|
|
|
|
} else if (hours < 19) {
|
|
|
|
return 'petang';
|
|
|
|
} else {
|
|
|
|
return 'malam';
|
|
|
|
}
|
|
|
|
},
|
|
|
|
calendar : {
|
|
|
|
sameDay : '[Hari ini pukul] LT',
|
|
|
|
nextDay : '[Esok pukul] LT',
|
|
|
|
nextWeek : 'dddd [pukul] LT',
|
|
|
|
lastDay : '[Kelmarin pukul] LT',
|
|
|
|
lastWeek : 'dddd [lepas pukul] LT',
|
|
|
|
sameElse : 'L'
|
|
|
|
},
|
|
|
|
relativeTime : {
|
2014-09-30 12:29:53 +02:00
|
|
|
future : 'dalam %s',
|
|
|
|
past : '%s yang lepas',
|
|
|
|
s : 'beberapa saat',
|
|
|
|
m : 'seminit',
|
|
|
|
mm : '%d minit',
|
|
|
|
h : 'sejam',
|
|
|
|
hh : '%d jam',
|
|
|
|
d : 'sehari',
|
|
|
|
dd : '%d hari',
|
|
|
|
M : 'sebulan',
|
|
|
|
MM : '%d bulan',
|
|
|
|
y : 'setahun',
|
|
|
|
yy : '%d tahun'
|
2014-07-31 18:00:20 +02:00
|
|
|
},
|
|
|
|
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.
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}));
|