Java Calendar Hour moveHoursHand(int aNumberOfHours, Calendar aCalendar)

Here you can find the source of moveHoursHand(int aNumberOfHours, Calendar aCalendar)

Description

move Hours Hand

License

Open Source License

Declaration

public static Calendar moveHoursHand(int aNumberOfHours, Calendar aCalendar) 

Method Source Code


//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();
    }
}

Related

  1. getHour(Calendar cal)
  2. getHour(Calendar calendar)
  3. hour(Calendar calendar)
  4. hourFloor(Calendar calendar)
  5. hoursInDay(Calendar cal)
  6. moveToCalendarHourJust(Calendar cal)
  7. moveToCalendarHourTerminal(Calendar cal)
  8. sameHour(Calendar one, Calendar two)
  9. setCalendar(int hour, int mins)