public static int daysDiff ( Date earlierDate , Date laterDate ) { if ( earlierDate == null || laterDate == null ) { return 0 ; } return ( int ) ( ( laterDate . getTime ( ) / DAY_MILLIS ) - ( earlierDate . getTime ( ) / DAY_MILLIS ) ) ; }
Get the days difference