code: public static String naturalDay(int style, Date then)
      {
          Date today = new Date();
          long delta = then.getTime() - today.getTime();
          long days = delta / ND_FACTOR;
  
          if (days == 0)
              return context.get().getMessage("today");
          else if (days == 1)
              return context.get().getMessage("tomorrow");
          else if (days == -1)
              return context.get().getMessage("yesterday");
  
          return formatDate(style, then);
      }
docs: For dates that are the current day or within one day, return 'today',
  'tomorrow' or 'yesterday', as appropriate. Otherwise, returns a string
  formatted according to a locale sensitive DateFormat.
  
  @param style
  The style of the Date
  @param then
  The date (GMT)
  @return String with 'today', 'tomorrow' or 'yesterday' compared to
  current day. Otherwise, returns a string formatted according to a
  locale sensitive DateFormat.