Java Hour getHour()

Here you can find the source of getHour()

Description

get Hour

License

Open Source License

Declaration

public static int getHour() 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    public static int getHour() {
        Calendar calendar = new GregorianCalendar();
        Date trialtime = new Date();
        calendar.setTime(trialtime);/*from w w  w .  ja  va  2s. c om*/
        return calendar.get(Calendar.HOUR);
    }
}

Related

  1. getHour()
  2. getHour()
  3. getHour()
  4. getHour()
  5. getHour()
  6. getHour()
  7. getHour()
  8. getHour(boolean military)
  9. getHour(Date begin, Date end)