/**
* 根据时间段获取 指定类型列表
* [@param](https://my.oschina.net/u/2303379) start
* [@param](https://my.oschina.net/u/2303379) end
* [@param](https://my.oschina.net/u/2303379) unit 天:0 周:1 月:2 季:3 半年:4 年:5
* [@return](https://my.oschina.net/u/556800) 天: 2019-07-11 周:2019-52 月:2019-07 季:2019-4 半年:2019-2 年:2019
*/
public static List getPeriod(LocalDate start,LocalDate end,int unit) {
if (start.compareTo(end) > 0) {
throw new DateTimeException("start cannot be greater than the end");
}
List list = new ArrayList<>();
switch (unit) {
case 0:
getDays(start,end,list);
break;
case 1:
getWeeks(start,end,list);
break;
case 2:
getMonths(start,end,list);
break;