UNPKG

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