code: public static Date fromRfcDate(final String val) throws BadDateException {
      try {
        synchronized (rfcDateFormat) {
          try {
            rfcDateFormat.setTimeZone(Timezones.getDefaultTz());
          } catch (TimezonesException tze) {
            throw new RuntimeException(tze);
          }
          return rfcDateFormat.parse(val);
        }
      } catch (Throwable t) {
        throw new BadDateException();
      }
    }
docs: Get Date from "yyyy-MM-dd"
  
  @param val String "yyyy-MM-dd"
  @return Date
  @throws BadDateException on format error