Here you can find the source of getNextDayStr(String curday)
public static String getNextDayStr(String curday)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.sql.Date; public class Main { static public SimpleDateFormat MMddYYYY_HHmmss = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); static public SimpleDateFormat yyyyMMdd = new SimpleDateFormat("yyyy-MM-dd"); public static String getNextDayStr(String curday) { java.util.Date date = str2utilDate(curday); return date2str(new Date(date.getTime() + 24 * 3600 * 1000)); }/*from w ww. ja v a 2 s. c o m*/ public static java.util.Date str2utilDate(String str) { try { java.util.Date udate = yyyyMMdd.parse(str); return udate; } catch (Exception e) { System.out.println("DateUtil.str2utilDate(str) Error:e = " + e); return null; } } public static String date2str(java.util.Date date) { if (date == null) return ""; try { return MMddYYYY_HHmmss.format(date); } catch (Exception e) { return ""; } } static public String date2str(java.sql.Date date) { if (date == null) return ""; try { return yyyyMMdd.format(date); } catch (Exception e) { return ""; } } }