Commit 31f84a1cc04ef3a2dfb12c8c85d368032f1d9d46
1 parent
795e5c8cd1
Exists in
master
and in
6 other branches
bbbbbb
Showing 1 changed file with 2 additions and 2 deletions
platform-common/src/main/java/com/lyms/platform/common/utils/DateUtil.java
View file @
31f84a1
... | ... | @@ -1358,7 +1358,7 @@ |
1358 | 1358 | temp.put("end", end); |
1359 | 1359 | } else { |
1360 | 1360 | temp.put("start", dates.get(i)); |
1361 | - temp.put("end", addDay(dates.get(dates.size() - 1), -1)); | |
1361 | + temp.put("end", addDay(dates.get(i + 1), -1)); | |
1362 | 1362 | } |
1363 | 1363 | restList.add(temp); |
1364 | 1364 | } |
... | ... | @@ -1424,7 +1424,7 @@ |
1424 | 1424 | } |
1425 | 1425 | |
1426 | 1426 | public static void main(String[] args) { |
1427 | - List<Map<String, Date>> monthBetween = getRange(parseYMD("2017-1-11"), parseYMD("2017-3-1")); | |
1427 | + List<Map<String, Date>> monthBetween = getRange(parseYMD("2017-1-11"), parseYMD("2017-12-29")); | |
1428 | 1428 | for (Map<String, Date> map : monthBetween) { |
1429 | 1429 | System.out.print("cname>> " + getyyyy_mm(map.get("cname"))); |
1430 | 1430 | System.out.print(" start>> " + getyyyy_MM_dd(map.get("start"))); |