Here you can find the source of datePlusDays(Date date, int days)
public static Date datePlusDays(Date date, int days)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { private static int DAY_OF_YEAR = Calendar.DAY_OF_YEAR; public static Date datePlusDays(Date date, int days) { Calendar calendar = getMoscowCalendar(); calendar.setTime(date);//from w w w . j av a 2 s. c om calendar.add(Calendar.DAY_OF_YEAR, days); return calendar.getTime(); } public static Calendar getMoscowCalendar() { return new GregorianCalendar(getMoscowTimeZone()); } public static Calendar getMoscowCalendar(Date time) { Calendar c = getMoscowCalendar(); c.setTime(time); return c; } public static TimeZone getMoscowTimeZone() { return java.util.TimeZone.getTimeZone("Europe/Moscow"); } }