List of utility methods to do Time to Hour Convert
int | hoursToEndOfMonth(Time t) Return number of whole hours to the end of month of a given time. final int hoursInThisMonth = 24 * t .getActualMaximum(Time.MONTH_DAY); final int hoursPassedInThisMonth = ((t.monthDay - 1) * 24) + t.hour; return Math.max(0, hoursInThisMonth - hoursPassedInThisMonth); |