ms-my.js 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //! moment.js locale configuration
  2. //! locale : Bahasa Malaysia (ms-MY)
  3. //! author : Weldan Jamili : https://github.com/weldan
  4. ;(function (global, factory) {
  5. typeof exports === 'object' && typeof module !== 'undefined'
  6. && typeof require === 'function' ? factory(require('../moment')) :
  7. typeof define === 'function' && define.amd ? define(['moment'], factory) :
  8. factory(global.moment)
  9. }(this, function (moment) { 'use strict';
  10. var ms_my = moment.defineLocale('ms-my', {
  11. months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
  12. monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
  13. weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
  14. weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
  15. weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
  16. longDateFormat : {
  17. LT : 'HH.mm',
  18. LTS : 'HH.mm.ss',
  19. L : 'DD/MM/YYYY',
  20. LL : 'D MMMM YYYY',
  21. LLL : 'D MMMM YYYY [pukul] HH.mm',
  22. LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
  23. },
  24. meridiemParse: /pagi|tengahari|petang|malam/,
  25. meridiemHour: function (hour, meridiem) {
  26. if (hour === 12) {
  27. hour = 0;
  28. }
  29. if (meridiem === 'pagi') {
  30. return hour;
  31. } else if (meridiem === 'tengahari') {
  32. return hour >= 11 ? hour : hour + 12;
  33. } else if (meridiem === 'petang' || meridiem === 'malam') {
  34. return hour + 12;
  35. }
  36. },
  37. meridiem : function (hours, minutes, isLower) {
  38. if (hours < 11) {
  39. return 'pagi';
  40. } else if (hours < 15) {
  41. return 'tengahari';
  42. } else if (hours < 19) {
  43. return 'petang';
  44. } else {
  45. return 'malam';
  46. }
  47. },
  48. calendar : {
  49. sameDay : '[Hari ini pukul] LT',
  50. nextDay : '[Esok pukul] LT',
  51. nextWeek : 'dddd [pukul] LT',
  52. lastDay : '[Kelmarin pukul] LT',
  53. lastWeek : 'dddd [lepas pukul] LT',
  54. sameElse : 'L'
  55. },
  56. relativeTime : {
  57. future : 'dalam %s',
  58. past : '%s yang lepas',
  59. s : 'beberapa 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 1st is the first week of the year.
  74. }
  75. });
  76. return ms_my;
  77. }));