Java Calendar Hour getHour(Calendar cal)

Here you can find the source of getHour(Calendar cal)

Description

get Hour

License

Open Source License

Declaration

public static int getHour(Calendar cal) 

Method Source Code

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

import java.util.Calendar;

public class Main {
    public static int getHour(Calendar cal) {
        int hr = cal.get(Calendar.HOUR);
        return (hr == 0 ? 12 : hr);
    }/*from w w w.  j ava2  s .  c  o  m*/
}

Related

  1. elapsedHours(Calendar aFirstDate, Calendar aSecondDate)
  2. get24Hour(Calendar calendar)
  3. getHour(boolean twentyFour, Calendar calendar)
  4. getHour(Calendar cal)
  5. getHour(Calendar calendar)
  6. hour(Calendar calendar)
  7. hourFloor(Calendar calendar)