Java Second Format getFutureDate(int seconds)

Here you can find the source of getFutureDate(int seconds)

Description

get Future Date

License

Apache License

Declaration

public static Date getFutureDate(int seconds) throws ParseException 

Method Source Code

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

import java.text.ParseException;

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

public class Main {
    public static Date getFutureDate(int seconds) throws ParseException {
        Calendar now = Calendar.getInstance();
        now.add(Calendar.SECOND, seconds);
        // 24 hours format
        return now.getTime();
    }//from  w  w w  . j  a  v a2s  . c o  m
}

Related

  1. getDHMS(long totalSecond)
  2. getElapsedSeconds(long startTime)
  3. getFormatMSecond(long long_)
  4. getFormattedDuration(int simTimeSeconds)
  5. getFullDateByMisSecond(long misSecond)
  6. getIntervalMilSeconds(String startDateStr, String endDateStr, String dateFormat)
  7. getMisSecond(String strDate)
  8. getSecond()
  9. getSecond()