请教大神注释下这几行代码。。。

看calendar的api也不是很清楚,求大神注解。图片说明

解:

calendar = Calendar.getInstance(); 取得 是 当前日期,
calendar.setTime(new Date()); Date 来初始化 Calendar 对象
calendar.set(月,日)

Long dayBeginMS = (calendar.getTimeInMillis());
//long型的整数 表示从1790-1-1 00:00:00到当前时间总共经过的时间的毫秒数。

Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date(ms.longValue()));

int year = calendar.get(1);
int month = calendar.get(2);
int day = calendar.get(5);

logger.log(Level.INFO, "isTheFirstTimeToGetCheckInfoByClassId day  " + year + "/" + month + "/" + day);
calendar.set(year, month, day);
calendar.set(11, 0);
calendar.set(12, 0);
calendar.set(13, 0);
calendar.set(14, 0);
Long dayBeginMS = (calendar.getTimeInMillis());
calendar.set(year, month, day);
calendar.set(11, 23);
calendar.set(12, 59);
calendar.set(13, 59);
calendar.set(14, 999);
Long dayEndMS = (calendar.getTimeInMillis());

isTheFirstTimeToGetCheckInfoByClassId
这个是关键,它指示了这段代码的用途
判断是否是第一次通过classid获得getcheckinfo