/**
* 获取学年 从2019-2020学年开始
*
* @return 学年
*/
public static List<Options> getSchoolYear() {
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(System.currentTimeMillis());
int currentYear = calendar.get(Calendar.YEAR);
LogUtils.e("currentYear" + currentYear);
int month = calendar.get(Calendar.MONTH) + 1;
LogUtils.e("month" + month);
if (month > 8)
currentYear = currentYear + 1;
List<Options> optionsList = new ArrayList<>();
if (currentYear < 2020) {
optionsList.add(new Options("2019-2020学年", "2019"));
} else {
for (int i = 0; i <= currentYear - 2020; i++) {
optionsList.add(new Options(MessageFormat.format("{0}-{1}学年",
String.valueOf(currentYear - i - 1),
String.valueOf(currentYear - i)), String.valueOf(currentYear - i - 1)));
}
}
return optionsList;
}