Android Calendar Add addMonth(Calendar c, int months)

Here you can find the source of addMonth(Calendar c, int months)

Description

add Month

Declaration

public static Date addMonth(Calendar c, int months) 

Method Source Code

//package com.java2s;

import java.util.Calendar;
import java.util.Date;

public class Main {
    public static Date addMonth(Calendar c, int months) {
        if (c == null)
            return null;
        c.add(Calendar.MONTH, months);
        return c.getTime();
    }/*  w ww  .ja  v a 2  s .  c o  m*/
}

Related

  1. add(int field, long time, int val)
  2. addDay(Calendar c, int days)
  3. after(Calendar c, long offset)
  4. afterNDays(Calendar c, int n)
  5. getDateAdd(Date date, int amount)
  6. getDateByAddFltHour(float flt)