Java Minute Add addMinutesToDate(final Date d, final int minutes)

Here you can find the source of addMinutesToDate(final Date d, final int minutes)

Description

add Minutes To Date

License

Apache License

Declaration

private static Date addMinutesToDate(final Date d, final int minutes) 

Method Source Code

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

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

public class Main {
    private static Date addMinutesToDate(final Date d, final int minutes) {
        final Calendar c = Calendar.getInstance();
        c.setTime(d);/*from   ww w.  j  a  v  a  2 s.  c om*/
        c.add(Calendar.MINUTE, minutes);
        return c.getTime();
    }
}

Related

  1. addMinutes(Date date, int minutes)
  2. addMinutes(Date in, int minutes)
  3. addMinutes(Date t, int minutes)
  4. addMinutes(java.util.Date date, long... minutes)
  5. addMinutesToDate(Date initialDateInMillis, Integer minutesToAdd)