@@ -0,0 +1,1353 @@
+package com.hzh.corejava.datetime;%0A%0Aimport java.text.DateFormat;%0Aimport java.text.ParseException;%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Calendar;%0Aimport java.util.Date;%0A%0A/**%0A * Created by Adam on 2016/3/25.%0A */%0Apublic class DayByDay %7B%0A    private static final String DATE_FORMAT = %22yyyy-MM-dd%22;%0A    public static void main(String%5B%5D args) %7B%0A        String start=%222016-03-01%22;%0A        String end=%222016-03-11%22;%0A        DateFormat df = new SimpleDateFormat(DATE_FORMAT);%0A        try %7B%0A            Date startDate = df.parse(start);%0A            Date endDate = df.parse(end);%0A            Date now = new Date();%0A            if (endDate.after(now)) %7B%0A                endDate = now;%0A            %7D%0A            Calendar calendar = Calendar.getInstance();%0A            calendar.setTime(startDate);%0A            Date currentStartDate;%0A            Date currentEndDate;%0A            do %7B%0A                currentStartDate = calendar.getTime();%0A                calendar.add(Calendar.DATE, 1);%0A                currentEndDate = calendar.getTime();%0A                System.out.println(%22=====================%22);%0A                System.out.println(currentStartDate);%0A                System.out.println(currentEndDate);%0A%0A            %7D while (calendar.getTime().before(endDate));%0A        %7D catch (ParseException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%7D%0A

Add DayByDay.java