get Month Offset - Android java.util

Android examples for java.util:Month

Description

get Month Offset

Demo Code

import java.util.Calendar;

public class Main{

    public static long getMonthOffset(int monthOffset) {
        Calendar cal = Calendar.getInstance();
        cal.add(Calendar.MONTH, monthOffset);
        return cal.getTimeInMillis();
    }//  w  w w  .  j a  va 2s  .c  om

}

Related Tutorials