|
@@ -1306,11 +1306,13 @@ public class DateUtil {
|
|
|
public static String getEndTerm(Date date) {
|
|
|
//一个学期默认为6个月,9月1日—2月28、29日,3月1日—8月31日
|
|
|
Integer month = Integer.parseInt(DateUtil.getMonth(date));
|
|
|
- String year = DateUtil.getYear(date);
|
|
|
if(month >= 9 || month <= 2){
|
|
|
- return year + "-02-01";
|
|
|
+ if(month >= 9){
|
|
|
+ return DateUtil.getYear(DateUtil.addYears(date,1)) + "-02-29";
|
|
|
+ }
|
|
|
+ return DateUtil.getYear(date)+ "-02-29";
|
|
|
}else {
|
|
|
- return year + "-08-31";
|
|
|
+ return DateUtil.getYear(date) + "-08-31";
|
|
|
}
|
|
|
}
|
|
|
|