Here you can find the source of addMonth(Calendar cal, int period)
public static Calendar addMonth(Calendar cal, int period)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { public static final String MONTH = "MM"; public static Calendar addMonth(Calendar cal, int period) { Calendar cal2 = cal;//from w w w .j a va 2 s.c o m cal2.set(Calendar.MONTH, cal.get(Calendar.MONTH) + period); return cal; } }