Here you can find the source of addHH(Date date, int i)
public static Date addHH(Date date, int i)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static Date addHH(Date date, int i) { if (date == null) return null; Calendar c = new GregorianCalendar(); c.setTime(date);/*from ww w . ja va 2 s .co m*/ c.add(Calendar.HOUR, i); return c.getTime(); } }