Generating all days between 2 given dates in Java [duplicate]
问题 This question already has answers here : how to get a list of dates between two dates in java (22 answers) Closed 2 years ago . I'm trying to get an array of Dates, while my input is a 'from'/'to' structure. So my input is: String date1 = "2014-01-01"; String date2 = "2014-05-01"; My output should be an Arraylist with all dates between date1 and date2. I've already looked for this, but I could only find questions about the difference between 2 dates: SimpleDateFormat myFormat = new