Java Calendar Hour getHour(boolean twentyFour, Calendar calendar)

Here you can find the source of getHour(boolean twentyFour, Calendar calendar)

Description

get Hour

License

Open Source License

Declaration

public static int getHour(boolean twentyFour, Calendar calendar) 

Method Source Code


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

import java.util.Calendar;

public class Main {
    public static int getHour(boolean twentyFour, Calendar calendar) {
        return calendar.get(twentyFour ? Calendar.HOUR_OF_DAY : Calendar.HOUR);
    }/*from   w w  w.j ava  2  s.  c o m*/
}

Related

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