Here you can find the source of getNDayAfterCurrentDate(int n)
public final static String getNDayAfterCurrentDate(int n)
//package com.java2s; import java.util.Calendar; public class Main { public final static String getNDayAfterCurrentDate(int n) { Calendar c = Calendar.getInstance(); c.add(Calendar.DAY_OF_MONTH, n); return formatCalendarToyyyyMMdd(c); }// w w w. j a v a2s .c o m public static String formatCalendarToyyyyMMdd(Calendar c) { return new StringBuffer().append(c.get(Calendar.YEAR)).append("-").append(c.get(Calendar.MONTH) + 1) .append("-").append(c.get(Calendar.DATE)).toString(); } }