code: private static int getDayOfMonth(Date date) {
  		Calendar cal = Calendar.getInstance();
  		cal.setTime(date);
  		return cal.get(Calendar.DAY_OF_MONTH);
  	}
docs: Gets the day of month.
  
  @param date the date
  @return the day of month