|
|
@ -128,16 +128,17 @@ public class DependentDateUtils { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* get interval on first/last day of the last month |
|
|
|
* get interval on first/last day of the needed month |
|
|
|
* @param businessDate businessDate |
|
|
|
* @param businessDate businessDate |
|
|
|
* @param isBeginDay isBeginDay |
|
|
|
* @param isBeginDay isBeginDay |
|
|
|
* @return DateInterval list |
|
|
|
* @return DateInterval list |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static List<DateInterval> getLastMonthBeginInterval(Date businessDate, |
|
|
|
public static List<DateInterval> getNeededMonthBeginInterval(Date businessDate, |
|
|
|
boolean isBeginDay) { |
|
|
|
boolean isBeginDay, |
|
|
|
|
|
|
|
int neededMonth) { |
|
|
|
|
|
|
|
|
|
|
|
Date firstDayThisMonth = DateUtils.getFirstDayOfMonth(businessDate); |
|
|
|
Date firstDayThisMonth = DateUtils.getFirstDayOfMonth(businessDate); |
|
|
|
Date lastDay = DateUtils.getSomeDay(firstDayThisMonth, -1); |
|
|
|
Date lastDay = DateUtils.getSomeDay(firstDayThisMonth, neededMonth); |
|
|
|
Date firstDay = DateUtils.getFirstDayOfMonth(lastDay); |
|
|
|
Date firstDay = DateUtils.getFirstDayOfMonth(lastDay); |
|
|
|
if (isBeginDay) { |
|
|
|
if (isBeginDay) { |
|
|
|
return getDateIntervalListBetweenTwoDates(firstDay, firstDay); |
|
|
|
return getDateIntervalListBetweenTwoDates(firstDay, firstDay); |
|
|
|