Java Minute Calculate getTime(int minuteDelt)

Here you can find the source of getTime(int minuteDelt)

Description

get Time

License

Apache License

Declaration

public static long getTime(int minuteDelt) 

Method Source Code


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

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static String getTime(String format, int minuteDelt) {
        Date nowTime = new Date();
        nowTime.setTime(nowTime.getTime() + minuteDelt * 60000);
        SimpleDateFormat time = new SimpleDateFormat(format);
        return time.format(nowTime);
    }/*  ww w.j av  a 2  s .c o m*/

    public static long getTime(int minuteDelt) {
        return (new Date().getTime() + minuteDelt * 60000) / 1000;
    }
}

Related

  1. getAlarmMinutes(String dtStart, String dtAlarm, Logger logger)
  2. getCurrCustomMinuteDate(String formatStr, int changeMinute)
  3. getForwardTimeByMinute(int minute, String format)
  4. getFutureDate(int _minutes)
  5. getIntevalMinutes(String startDate, String endDate)
  6. getTimeAddMinute(String time, int minute)
  7. getTimeInDate(int offSetInMinutes)
  8. getTravelTimeinMinutes(String startTime, String endTime)
  9. minusMinutes(String s, long minutes)