Android Calendar Add after(Calendar c, long offset)

Here you can find the source of after(Calendar c, long offset)

Description

after

Declaration

public static Calendar after(Calendar c, long offset) 

Method Source Code

//package com.java2s;

import java.util.Calendar;

public class Main {
    public static Calendar after(Calendar c, long offset) {
        Calendar calendar = null;
        if (c != null) {
            calendar = c;/*  www.ja  v  a2s .  c o m*/
        } else {
            calendar = Calendar.getInstance();
        }

        calendar.setTimeInMillis(calendar.getTimeInMillis() - offset);
        return calendar;
    }
}

Related

  1. add(int field, long time, int val)
  2. addDay(Calendar c, int days)
  3. addMonth(Calendar c, int months)
  4. afterNDays(Calendar c, int n)
  5. getDateAdd(Date date, int amount)
  6. getDateByAddFltHour(float flt)
  7. getDateByAddHour(String datetime, int minute)