Here you can find the source of getCalendarXDaysFromY(long startTimeInMillis, int daysFromStartDate)
private static Calendar getCalendarXDaysFromY(long startTimeInMillis, int daysFromStartDate)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { private static Calendar getCalendarXDaysFromY(long startTimeInMillis, int daysFromStartDate) { Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(startTimeInMillis); cal.add(Calendar.DAY_OF_YEAR, daysFromStartDate); return cal; }// w ww .j a va 2 s . c o m }