code: private static boolean singleDayEvent(long startMillis, long endMillis, long localGmtOffset) {
          if (startMillis == endMillis) {
              return true;
          }
  
          // An event ending at midnight should still be a single-day event, so check
          // time end-1.
          int startDay = Time.getJulianDay(startMillis, localGmtOffset);
          int endDay = Time.getJulianDay(endMillis - 1, localGmtOffset);
          return startDay == endDay;
      }
docs: Returns whether the specified time interval is in a single day.