Java Hour getHourAfter(Date date, int hour)

Here you can find the source of getHourAfter(Date date, int hour)

Description

get Hour After

License

Open Source License

Declaration

public static Date getHourAfter(Date date, int hour) 

Method Source Code

//package com.java2s;

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

public class Main {
    public static Date getHourAfter(Date date, int hour) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);//  w  w w.j  a  va2 s.c o m
        calendar.set(Calendar.HOUR, hour + 1);
        return calendar.getTime();
    }
}

Related

  1. getHour(java.util.Date date)
  2. getHour(long t)
  3. getHour(String dateString)
  4. getHour(String dateTime)
  5. getHour12(Date date)
  6. getHourAfter(final Date _from, final int _hours)
  7. getHourAndMin(long time)
  8. getHourAndMinutes(Date dt)
  9. getHourBeforeTime(int hour)