ms.js 2.7 KB

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