List of utility methods to do Hour Format
String | getHourFormat(String string) get Hour Format try { return sdf_hour.format(sdf_hour.parse(string)); } catch (ParseException e) { return null; |
SimpleDateFormat | getHourMinuteFormatter() get Hour Minute Formatter return hmformatter;
|
NumberFormat | getHoursNumberFormat() get Hours Number Format return getHoursNumberFormat(Locale.getDefault());
|
String | getOnehouragoFormatString(String format) get Onehourago Format String SimpleDateFormat formatter = new SimpleDateFormat(format, Locale.UK); Date date = new Date(); date.setTime(date.getTime() - (1 * 1000 * 60 * 60)); return formatter.format(date); |
int | hoursBetween(String from, String to, String format) hours Between SimpleDateFormat formatter = new SimpleDateFormat(format, Locale.UK); Calendar calendar = Calendar.getInstance(Locale.UK); calendar.setFirstDayOfWeek(Calendar.MONDAY); calendar.setMinimalDaysInFirstWeek(4); Date date1 = null; Date date2 = null; try { date1 = formatter.parse(from); ... |
String | hoursFrom(Date date, int amount, String format) hours From SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(hoursFrom(date, amount)); |