Merge pull request #1929 from imapach/v5-dev

add method
This commit is contained in:
Golden Looly 2021-11-02 23:28:43 +08:00 committed by GitHub
commit 285a84a1e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1877,6 +1877,10 @@ public class DateUtil extends CalendarUtil {
return CollUtil.newArrayList((Iterable<DateTime>) range(start, end, unit));
}
public static List<DateTime> rangeToList(Date start, Date end, final DateField unit, int step) {
return CollUtil.newArrayList((Iterable<DateTime>) new DateRange(start, end, unit, step));
}
/**
* 通过生日计算星座
*