假设合理性校验已过start < end start.year < end.year || start.month + 2 <= end.month || (start.month == end.month && end.day == 31) ||[1, 3, 5, 7, 8, 10 ,12].indexOf(start.month) != -1 先判断跨年一定有31号,同年差两个月一定有31号,同年同月结束日为31号一定有31号,同年差一月起始月为一三五七八十腊一定有31号
假设合理性校验已过start < end
start.year < end.year || start.month + 2 <= end.month || (start.month == end.month && end.day == 31) ||
[1, 3, 5, 7, 8, 10 ,12].indexOf(start.month) != -1
先判断跨年一定有31号,同年差两个月一定有31号,同年同月结束日为31号一定有31号,同年差一月起始月为一三五七八十腊一定有31号