Here you can find the source of getCalendar(Calendar cal, int relativeDay)
public static Calendar getCalendar(Calendar cal, int relativeDay)
//package com.java2s; /*// ww w . ja v a 2 s . c om * Title: TRS ?????? * Copyright: Copyright (c) 2004-2005, TRS?????????????. All rights reserved. * License: see the license file. * Company: TRS?????????????(www.trs.com.cn) * * Created on 2005-5-11 */ import java.util.Calendar; public class Main { public static Calendar getCalendar(Calendar cal, int relativeDay) { cal.add(Calendar.DATE, relativeDay); return cal; } }