private Integer getIntegerTimeInMinutes ( Date date ) { Integer result = null ; if ( date != null ) { Calendar cal = DateHelper . popCalendar ( date ) ; int time = cal . get ( Calendar . HOUR_OF_DAY ) * 60 ; time += cal . get ( Calendar . MINUTE ) ; DateHelper . pushCalendar ( cal ) ; result = Integer . valueOf ( time ) ; } return ( result ) ; }
This internal method is used to convert from a Date instance to an integer representing the number of minutes past midnight .