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