Sample analysis of js's acquisition of the last week, month, and three months
Js obtains the sample analysis of the last week, one month and three months. In response to this problem, this article introduces the corresponding analysis and solutions in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
For nearly a week, var end = new Date (); var year = end.getFullYear (); var month = end.getMonth () + 1 Trachap 0-11 means January-December var day = end.getDate (); var dateObj = {}; dateObj.end = year +'- + month +'-'+ day;if (day-7)