Here you can find the source of getOffsetDayOffNow(int offset)
public static String getOffsetDayOffNow(int offset)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String getOffsetDayOffNow(int offset) { Calendar c = Calendar.getInstance(); c.add(Calendar.DAY_OF_MONTH, offset); return new SimpleDateFormat("yyyy-MM-dd 00:00:00").format(c.getTime()); }/*from w ww .jav a 2s . c o m*/ }