java8 jdk8 遍历某段时间

 LocalDate dateBegin = LocalDate.parse("2017-03-01", DateTimeFormatter.ISO_LOCAL_DATE);
		LocalDate dateEnd = null;
		dateEnd = LocalDate.now();
		String key = null;

		while (dateEnd.compareTo(dateBegin) >= 0) {
			key = dateEnd.format(DateTimeFormatter.ISO_LOCAL_DATE);
			dateEnd = dateEnd.minusDays(1);
			System.err.println(key);
		}

    原文作者:huimin618
    原文地址: https://blog.csdn.net/huijie618/article/details/62225005
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞