Java Hour getHour(Date date)

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

Description

get Hour

License

Apache License

Parameter

Parameter Description
date a parameter

Return

int

Declaration

public static int getHour(Date date) 

Method Source Code

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

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

public class Main {

    public static int getHour(Date date) {
        Calendar cld = Calendar.getInstance();
        cld.setTime(date);/*from   w  w w  .  j av a 2s  . c  o  m*/
        return cld.get(Calendar.HOUR_OF_DAY);
    }
}

Related

  1. getHour(Date d)
  2. getHour(Date d)
  3. getHour(Date d)
  4. getHour(Date date)
  5. getHour(Date date)
  6. getHour(Date date)
  7. getHour(Date date)
  8. getHour(Date date)
  9. getHour(Date date)