| | |
| | | }
|
| | | if (start == null) {
|
| | | Calendar cal = Calendar.getInstance();
|
| | | String s = cal.get(Calendar.YEAR) + "";
|
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
|
| | | start = sdf.parse(s);
|
| | | cal.setTime(new Date());
|
| | | cal.set(Calendar.DAY_OF_MONTH, 1);
|
| | | cal.set(Calendar.HOUR_OF_DAY,0);
|
| | | cal.set(Calendar.MINUTE,0);
|
| | | cal.set(Calendar.SECOND,0);
|
| | | start = cal.getTime();
|
| | | }
|
| | |
|
| | | if (end == null) {
|
| | | end = new Date();
|
| | | Calendar cal = Calendar.getInstance();
|
| | | cal.setTime(start);
|
| | | int lastDay = cal.getActualMaximum(Calendar.DATE);
|
| | | cal.set(Calendar.DAY_OF_MONTH, lastDay);
|
| | | cal.set(Calendar.HOUR_OF_DAY,23);
|
| | | cal.set(Calendar.MINUTE,59);
|
| | | cal.set(Calendar.SECOND,59);
|
| | | end = cal.getTime();
|
| | | }
|
| | |
|
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
|