Java Minute getDateAfter(Date date, int minute)

Here you can find the source of getDateAfter(Date date, int minute)

Description

get Date After

License

Open Source License

Declaration

public static Date getDateAfter(Date date, int minute) 

Method Source Code

//package com.java2s;

import java.util.*;

public class Main {

    public static Date getDateAfter(Date date, int minute) {
        Calendar calendar = Calendar.getInstance();
        if (date != null) {
            calendar.setTime(date);//from  w  ww .j a va2  s. c  o m
        } else {
            calendar.setTime(new Date());
        }
        calendar.add(Calendar.MINUTE, minute);
        return calendar.getTime();
    }
}

Related

  1. calMinutes(Date date1, Date date2)
  2. countMinute(Long time)
  3. elapsedMinutes(int beginTimeInMinutes, int endTimeInMinutes)
  4. extractMinutes(String[] parts)
  5. floorTimestamp(Date ts, int windowMinutes)
  6. getDateTime(Date d, int hour, int minute, int second, int millisecond)
  7. isMinute(int num)
  8. isValidMinute(final int min)
  9. isWholeMinute(int seconds)