Java Hour getHour(java.util.Date date)

Here you can find the source of getHour(java.util.Date date)

Description

get Hour

License

Open Source License

Declaration

public static int getHour(java.util.Date date) 

Method Source Code

//package com.java2s;

public class Main {

    public static int getHour(java.util.Date date) {
        java.util.Calendar c = java.util.Calendar.getInstance();

        c.setTime(date);//  w  w  w. ja  v  a 2s .com

        return c.get(java.util.Calendar.HOUR_OF_DAY);

    }
}

Related

  1. getHour(Date date)
  2. getHour(Date date)
  3. getHour(Date date)
  4. getHour(Date now)
  5. getHour(final Date timeFrom)
  6. getHour(long t)
  7. getHour(String dateString)
  8. getHour(String dateTime)
  9. getHour12(Date date)