这里有问题if (month != 2) { return DAYS[month]; }你这里不应该是month != 2,因为数组序列是从零开始的当month == 2你return DAYS[2];其实是三月的天数