Here you can find the source of getTodayAndTomorrow()
public static List<String> getTodayAndTomorrow()
//package com.java2s; //License from project: Apache License import java.sql.Date; import java.util.ArrayList; import java.util.Calendar; import java.util.List; public class Main { public static List<String> getTodayAndTomorrow() { List<String> dates = new ArrayList<String>(); Calendar cal = Calendar.getInstance(); dates.add(new Date(cal.getTimeInMillis()).toString()); cal.add(Calendar.DATE, 1); dates.add(new Date(cal.getTimeInMillis()).toString()); return dates; }//from w ww .j ava 2s. c o m }