Here you can find the source of moveHoursHand(int aNumberOfHours, Calendar aCalendar)
public static Calendar moveHoursHand(int aNumberOfHours, Calendar aCalendar)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { public static Calendar moveHoursHand(int aNumberOfHours, Calendar aCalendar) { Calendar clone = clone(aCalendar); clone.add(Calendar.HOUR_OF_DAY, aNumberOfHours); return clone; }/*from w w w . j a v a 2 s. c o m*/ private static Calendar clone(Calendar aCalendar) { return (Calendar) aCalendar.clone(); } }