Here you can find the source of getNextDay(String date)
public final static String getNextDay(String date)
//package com.java2s; /**//from www. j a v a 2 s .c o m * @copyright Copyright (C) 2014-2016 City of Bloomington, Indiana. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.txt * @author W. Sibo <sibow@bloomington.in.gov> * */ import java.util.*; public class Main { public final static String getNextDay(String date) { String ret = ""; int mm = 0, dd = 0, yy = 0; if (date != null) { String[] arr = date.split("/"); if (arr.length == 3) { try { mm = Integer.parseInt(arr[0]); dd = Integer.parseInt(arr[1]); yy = Integer.parseInt(arr[2]); Calendar cal = Calendar.getInstance(); cal.set(Calendar.MONTH, (mm - 1)); cal.set(Calendar.DATE, dd + 1); cal.set(Calendar.YEAR, yy); mm = cal.get(Calendar.MONTH) + 1; dd = cal.get(Calendar.DATE); yy = cal.get(Calendar.YEAR); ret = mm + "/" + dd + "/" + yy; } catch (Exception ex) { System.err.println(ex); } } } return ret; } }