Here you can find the source of getTommorrow(String today)
public static String getTommorrow(String today)
//package com.java2s; import java.util.*; public class Main { public static String getTommorrow(String today) { Calendar cal = Calendar.getInstance(); cal.set(Integer.parseInt(today.substring(0, 4)), Integer.parseInt(today.substring(4, 6)) - 1, Integer.parseInt(today.substring(6, 8))); cal.add(Calendar.DATE, 1); String curMonth, curDay;// w w w .ja v a 2 s .co m int tmpMonth, tmpDay; tmpMonth = cal.get(Calendar.MONTH) + 1; tmpDay = cal.get(Calendar.DATE); if (tmpMonth < 10) curMonth = "0" + String.valueOf(tmpMonth); else curMonth = String.valueOf(tmpMonth); if (tmpDay < 10) curDay = "0" + String.valueOf(tmpDay); else curDay = String.valueOf(tmpDay); return (Integer.toString(cal.get(Calendar.YEAR)) + curMonth + curDay); } }