code: public static boolean sameDay(Date dateOne, Date dateTwo) {
          if ((dateOne == null) || (dateTwo == null)) {
              return false;
          }
  
          Calendar cal = Calendar.getInstance();
          cal.setTime(dateOne);
          int year = cal.get(Calendar.YEAR);
          int day = cal.get(Calendar.DAY_OF_YEAR);
  
          cal.setTime(dateTwo);
          int year2 = cal.get(Calendar.YEAR);
          int day2 = cal.get(Calendar.DAY_OF_YEAR);
  
          return ( (year == year2) && (day == day2) );
      }
docs: Test to see if two dates are in the same day of year
  
  @param dateOne first date
  @param dateTwo second date
  @return true if the two dates are in the same day of year