code: public static AcceptDatetime valueOf(final String value) {
          final Optional<Instant> datetime = parseDatetime(value);
          if (datetime.isPresent()) {
              return new AcceptDatetime(datetime.get());
          }
          return null;
      }
docs: Create an Accept-Datetime header object from a string
  @param value the header value
  @return an AcceptDatetime object or null if the value is not parseable