- 添加 Vant WeApp 组件库的多个组件和工具文件 - 新增的组件包括 calendar、circle、collapse、dialog 等- 添加了常用的工具函数和样式文件 - 在 app.js 中集成了 Vant WeApp 组件库
26 lines
558 B
XML
26 lines
558 B
XML
/* eslint-disable */
|
|
function getMonthEndDay(year, month) {
|
|
return 32 - getDate(year, month - 1, 32).getDate();
|
|
}
|
|
|
|
function compareMonth(date1, date2) {
|
|
date1 = getDate(date1);
|
|
date2 = getDate(date2);
|
|
|
|
var year1 = date1.getFullYear();
|
|
var year2 = date2.getFullYear();
|
|
var month1 = date1.getMonth();
|
|
var month2 = date2.getMonth();
|
|
|
|
if (year1 === year2) {
|
|
return month1 === month2 ? 0 : month1 > month2 ? 1 : -1;
|
|
}
|
|
|
|
return year1 > year2 ? 1 : -1;
|
|
}
|
|
|
|
module.exports = {
|
|
getMonthEndDay: getMonthEndDay,
|
|
compareMonth: compareMonth
|
|
};
|