Java Day End getDateInterval4EndDate(Date date, int hourModify)

Here you can find the source of getDateInterval4EndDate(Date date, int hourModify)

Description

get Date Interval End Date

License

Apache License

Declaration

public static Date getDateInterval4EndDate(Date date, int hourModify) 

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 getDateInterval4EndDate(Date date, int hourModify) {

        Calendar c = Calendar.getInstance();
        c.setTime(date);//from www . jav  a2s .  c  o m
        int second = c.get(Calendar.SECOND);
        int hour = c.get(Calendar.HOUR);
        c.set(Calendar.SECOND, second + 3);
        c.set(Calendar.HOUR, hour - hourModify);
        return c.getTime();
    }
}

Related

  1. getCalender(Date date)
  2. getCertificateEndDate(int days)
  3. getDatebetweenOfDays(Date startDate, Date endDate)
  4. getDateEnd(java.util.Date d)
  5. getDateEndDay()
  6. getDateList(Date begin, Date end)
  7. getDatesBetweenTwoDate(Date beginDate, Date endDate)
  8. getDateTimeString(boolean appendMillis)
  9. getDefaultEndDateForLogQuery()