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.

73 lines
2.3 KiB

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