code: public static String rfcDate(final Date val) {
      synchronized (rfcDateFormat) {
        try {
          rfcDateFormat.setTimeZone(Timezones.getDefaultTz());
        } catch (TimezonesException tze) {
          throw new RuntimeException(tze);
        }
        return rfcDateFormat.format(val);
      }
    }
docs: Turn Date into "yyyy-MM-dd"
  
  @param val date
  @return String "yyyy-MM-dd"