momentjs 所有方法
时间: 2024-02-11 15:51:53 浏览: 148
Moment.js 是一个 JavaScript 的日期处理库,提供了许多方便的日期处理方法。以下是 Moment.js 提供的所有方法列表:
1. moment()
2. moment.utc()
3. moment.parseZone()
4. moment.isMoment()
5. moment.duration()
6. moment.isDuration()
7. moment.fn
8. moment.prototype
9. moment.updateLocale()
10. moment.locale()
11. moment.localeData()
12. moment.duration.fn
13. moment.duration.prototype
14. moment().isValid()
15. moment().parsingFlags()
16. moment().creationData()
17. moment().format()
18. moment().toISOString()
19. moment().toJSON()
20. moment().toArray()
21. moment().toDate()
22. moment().toObject()
23. moment().toString()
24. moment().valueOf()
25. moment().unix()
26. moment().valueOfOf()
27. moment().year()
28. moment().quarter()
29. moment().month()
30. moment().week()
31. moment().isoWeek()
32. moment().day()
33. moment().date()
34. moment().hour()
35. moment().minute()
36. moment().second()
37. moment().millisecond()
38. moment().startOf()
39. moment().endOf()
40. moment().add()
41. moment().subtract()
42. moment().diff()
43. moment().from()
44. moment().fromNow()
45. moment().calendar()
46. moment().isLeapYear()
47. moment().isBefore()
48. moment().isSame()
49. moment().isAfter()
50. moment().isBetween()
51. moment().isDSTShifted()
52. moment().isDST()
53. moment().isUTC()
54. moment().isUtcOffset()
55. moment().zone()
56. moment().local()
57. moment().utc()
58. moment().utcOffset()
59. moment().parseZone()
60. moment().hasAlignedHourOffset()
61. moment().toArray()
62. moment().toObject()
63. moment().toString()
64. moment().valueOf()
65. moment().format()
66. moment().diff()
67. moment().from()
68. moment().fromNow()
69. moment().calendar()
70. moment().isLeapYear()
71. moment().isBefore()
72. moment().isSame()
73. moment().isAfter()
74. moment().isBetween()
75. moment().isDSTShifted()
76. moment().isDST()
77. moment().isUTC()
78. moment().isUtcOffset()
79. moment().zone()
80. moment().local()
81. moment().utc()
82. moment().utcOffset()
83. moment().parseZone()
84. moment().hasAlignedHourOffset()
85. moment.add()
86. moment.subtract()
87. moment.utc()
88. moment.local()
89. moment.min()
90. moment.max()
91. moment.utcOffset()
92. moment.parseTwoDigitYear()
93. moment.invalid()
94. moment.months()
95. moment.monthsShort()
96. moment.weekdays()
97. moment.weekdaysShort()
98. moment.weekdaysMin()
99. moment.weekdaysLocale()
100. moment.weekdaysShortLocale()
101. moment.weekdaysMinLocale()
102. moment.defineLocale()
103. moment.updateLocale()
104. moment.locales()
105. moment.weekdays()
106. moment.weekdaysShort()
107. moment.weekdaysMin()
108. moment.isDuration()
109. moment.duration()
110. moment.duration.fn
111. moment.duration.prototype
112. moment.duration().humanize()
113. moment.duration().asMilliseconds()
114. moment.duration().asSeconds()
115. moment.duration().asMinutes()
116. moment.duration().asHours()
117. moment.duration().asDays()
118. moment.duration().asWeeks()
119. moment.duration().asMonths()
120. moment.duration().asYears()
121. moment.duration().valueOf()
122. moment.duration().add()
123. moment.duration().subtract()
124. moment.duration().totalMilliseconds()
125. moment.duration().totalSeconds()
126. moment.duration().totalMinutes()
127. moment.duration().totalHours()
128. moment.duration().totalDays()
129. moment.duration().totalWeeks()
130. moment.duration().totalMonths()
131. moment.duration().totalYears()
132. moment.duration().humanize()
133. moment.duration().add()
134. moment.duration().subtract()
135. moment.duration().isDuration()
136. moment.duration().toJSON()
137. moment.duration().toString()
138. moment.duration().valueOf()
阅读全文