Java Date Before getMinuteBefore(Date date, int minute)

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

Description

get Minute Before

License

Open Source License

Declaration

public static Date getMinuteBefore(Date date, int minute) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static Date getMinuteBefore(Date date, int minute) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);/*from   w w w.j  av a2  s.co m*/
        calendar.add(Calendar.MINUTE, -minute);
        return calendar.getTime();
    }
}

Related

  1. getDateBeforTwelveMonth()
  2. getDateTimeAfterOfBeforeHour(Integer AfterOfBeforeHour)
  3. getDayBeforeOrAfter2(Date time, int days)
  4. getDayFormSomeDay(Date date, int n, boolean before)
  5. getDistanceMonthOfTwoDate(Date before, Date after)
  6. getMonth(Date time, int monthBefore, int monthAfter)
  7. getMonthBefore(Date currentDate, int numberMonthBefore)
  8. getMonthStartDateBeforeCurrent(int monthNum, Date current)
  9. getOneHourBefore(Date date)