You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.8 KiB

  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' ? factory(require('../moment')) :
  6. typeof define === 'function' && define.amd ? define(['moment'], factory) :
  7. factory(global.moment)
  8. }(this, function (moment) { 'use strict';
  9. var ms_my = moment.defineLocale('ms-my', {
  10. months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
  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 : 'LT.ss',
  18. L : 'DD/MM/YYYY',
  19. LL : 'D MMMM YYYY',
  20. LLL : 'D MMMM YYYY [pukul] LT',
  21. LLLL : 'dddd, D MMMM YYYY [pukul] LT'
  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. m : 'seminit',
  60. mm : '%d minit',
  61. h : 'sejam',
  62. hh : '%d jam',
  63. d : 'sehari',
  64. dd : '%d hari',
  65. M : 'sebulan',
  66. MM : '%d bulan',
  67. y : 'setahun',
  68. yy : '%d tahun'
  69. },
  70. week : {
  71. dow : 1, // Monday is the first day of the week.
  72. doy : 7 // The week that contains Jan 1st is the first week of the year.
  73. }
  74. });
  75. return ms_my;
  76. }));