Java tutorial
//package com.java2s; import android.util.Log; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; public class Main { public static Calendar getFinishDate(String startDate, String duration) { try { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH); Calendar calendarFinish = Calendar.getInstance(); calendarFinish.setTime(sdf.parse(startDate)); calendarFinish.add(Calendar.DATE, Integer.parseInt(duration)); return calendarFinish; } catch (ParseException e) { Log.e("PARSE_FAIL", Log.getStackTraceString(e)); } return null; } }