code: public static long parseDate(String value) {
          Date date = null;
          for (SimpleDateFormat format : FORMATS_TEMPLATE) {
              try {
                  date = format.parse(value);
              } catch (ParseException e) {
                  // Nothing.
              }
          }
  
          if (date == null) return -1L;
          return date.getTime();
      }
docs: Try to parse the given date as a HTTP date.
  
  @param value the HTTP date.
  
  @return the date as a long.