Java Hour getCalenderWithHour(int hours)

Here you can find the source of getCalenderWithHour(int hours)

Description

get Calender With Hour

License

Apache License

Declaration

public static Calendar getCalenderWithHour(int hours) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.Calendar;
import java.util.TimeZone;

public class Main {
    public static Calendar getCalenderWithHour(int hours) {
        Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
        cal.add(Calendar.HOUR, hours);
        return cal;
    }/*from  ww w .j  a va 2  s  .  co m*/
}

Related

  1. delayBeforeNextHour()
  2. get24Hour()
  3. getAlarmOnQuarterHour()
  4. getAnHourBack()
  5. getBeforeOneHour()
  6. getCurrentHour()
  7. getCurrentHour()
  8. getCurrentHour()
  9. getCurrentHours()