Android Date Interval Get offsetMinute(Date date, int offset)

Here you can find the source of offsetMinute(Date date, int offset)


offset Minute


public static Date offsetMinute(Date date, int offset) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static Date offsetMinute(Date date, int offset) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);/* w ww .  j  a v a 2 s  .  c  om*/
                (calendar.get(Calendar.MINUTE) + offset));
        return calendar.getTime();


  1. millisecondsBetween(Date dt1, Date dt2)
  2. millisecondsBetween(Date dt1, Date dt2)
  3. minuteBetweenDate(Date date1, Date date2)
  4. minutesBetween(Date dt1, Date dt2)
  5. minutesBetween(Date dt1, Date dt2)
  6. offsetSecond(Date date, int offset)
  7. secondBetweenDate(Date date1, Date date2)
  8. secondDiff(Date date1, Date date2)
  9. secondDiff(String startTime, String endTime)