ms.js (2277B)
1//! moment.js locale configuration 2//! locale : Malay [ms] 3//! author : Weldan Jamili : https://github.com/weldan 4 5import moment from '../moment'; 6 7export default moment.defineLocale('ms', { 8 months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split( 9 '_' 10 ), 11 monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), 12 weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), 13 weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), 14 weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), 15 longDateFormat: { 16 LT: 'HH.mm', 17 LTS: 'HH.mm.ss', 18 L: 'DD/MM/YYYY', 19 LL: 'D MMMM YYYY', 20 LLL: 'D MMMM YYYY [pukul] HH.mm', 21 LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', 22 }, 23 meridiemParse: /pagi|tengahari|petang|malam/, 24 meridiemHour: function (hour, meridiem) { 25 if (hour === 12) { 26 hour = 0; 27 } 28 if (meridiem === 'pagi') { 29 return hour; 30 } else if (meridiem === 'tengahari') { 31 return hour >= 11 ? hour : hour + 12; 32 } else if (meridiem === 'petang' || meridiem === 'malam') { 33 return hour + 12; 34 } 35 }, 36 meridiem: function (hours, minutes, isLower) { 37 if (hours < 11) { 38 return 'pagi'; 39 } else if (hours < 15) { 40 return 'tengahari'; 41 } else if (hours < 19) { 42 return 'petang'; 43 } else { 44 return 'malam'; 45 } 46 }, 47 calendar: { 48 sameDay: '[Hari ini pukul] LT', 49 nextDay: '[Esok pukul] LT', 50 nextWeek: 'dddd [pukul] LT', 51 lastDay: '[Kelmarin pukul] LT', 52 lastWeek: 'dddd [lepas pukul] LT', 53 sameElse: 'L', 54 }, 55 relativeTime: { 56 future: 'dalam %s', 57 past: '%s yang lepas', 58 s: 'beberapa saat', 59 ss: '%d saat', 60 m: 'seminit', 61 mm: '%d minit', 62 h: 'sejam', 63 hh: '%d jam', 64 d: 'sehari', 65 dd: '%d hari', 66 M: 'sebulan', 67 MM: '%d bulan', 68 y: 'setahun', 69 yy: '%d tahun', 70 }, 71 week: { 72 dow: 1, // Monday is the first day of the week. 73 doy: 7, // The week that contains Jan 7th is the first week of the year. 74 }, 75});