List of utility methods to do Hour
int | getHour(Date now) get Hour Calendar calendar = getCalendarFromDate(now);
return calendar.get(Calendar.HOUR_OF_DAY);
|
int | getHour(final Date timeFrom) Gets the hour. final Calendar instance = Calendar.getInstance(); instance.setTime(timeFrom); final int hour = instance.get(Calendar.HOUR); return hour; |
int | getHour(java.util.Date date) get Hour java.util.Calendar c = java.util.Calendar.getInstance();
c.setTime(date);
return c.get(java.util.Calendar.HOUR_OF_DAY);
|
int | getHour(long t) get Hour Calendar cld = Calendar.getInstance(); if (t > 0) { cld.setTime(new java.util.Date(t)); return cld.get(Calendar.HOUR_OF_DAY); |
int | getHour(String dateString) get Hour Calendar calendar = getCalendar(dateString);
return calendar.get(Calendar.HOUR_OF_DAY);
|
int | getHour(String dateTime) get Hour Date date = null; try { date = new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(dateTime); } catch (ParseException e) { e.printStackTrace(); Calendar now = Calendar.getInstance(); now.setTime(date); ... |
int | getHour12(Date date) Return hour12. return getCalendar(date).get(Calendar.HOUR);
|
Date | getHourAfter(Date date, int hour) get Hour After Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.set(Calendar.HOUR, hour + 1);
return calendar.getTime();
|
Date | getHourAfter(final Date _from, final int _hours) get Hour After return getDateTimeAfter(_from, Calendar.HOUR_OF_DAY, _hours);
|
String | getHourAndMin(long time) get Hour And Min SimpleDateFormat format = new SimpleDateFormat("HH:mm"); return format.format(new Date(time)); |