Java Date Add dateAddMinutes(Date date, int minutes)

Here you can find the source of dateAddMinutes(Date date, int minutes)

Description

date Add Minutes

License

Apache License

Declaration

public static Date dateAddMinutes(Date date, int minutes) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

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

public class Main {
    public static Date dateAddMinutes(Date date, int minutes) {
        if (date == null)
            return null;
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);//from   ww w  . ja  v  a  2  s  .c  o  m
        cal.add(Calendar.MINUTE, minutes);
        return cal.getTime();
    }
}

Related

  1. DateAddDays(Date _date, int days)
  2. dateAddDays(Date date, int days)
  3. dateAddDays(Date date, int days)
  4. dateAddDays(Date time, int days, String dateFormat)
  5. dateAddHours(Date time, int hours, SimpleDateFormat dateFormat)
  6. dateAddMM(Date date, int i)
  7. dateAddMonths(Date date, int addMonths)
  8. dateAddSpaceMilliSecond(Date date, int milliSecond)