code: public static Date parseDate(String dateString, boolean dateBackwardCompatibility) {
          if (!dateBackwardCompatibility) {
              return parseDate(dateString);
          }
  
          final int beginMilliIndex = 20;     // Length of "yyyy-MM-ddTHH:mm:ss."
          final int endTenthMilliIndex = 24;  // Length of "yyyy-MM-ddTHH:mm:ss.SSSS"
  
          // Check whether the millisecond and tenth of a millisecond digits are all 0.
          if (dateString.length() > endTenthMilliIndex &&
                  "0000".equals(dateString.substring(beginMilliIndex, endTenthMilliIndex))) {
              // Remove the millisecond and tenth of a millisecond digits.
              // Treat the final three digits (ticks) as milliseconds.
              dateString = dateString.substring(0, beginMilliIndex) + dateString.substring(endTenthMilliIndex);
          }
  
          return parseDate(dateString);
      }
docs: Given a String representing a date in a form of the ISO8601 pattern, generates a Date representing it
  with up to millisecond precision. Use {@link #parseDate(String)} instead unless
  <code>dateBackwardCompatibility</code> is needed.
  <p>
  See <a href="http://go.microsoft.com/fwlink/?LinkId=523753">here</a> for more details.
  
  @param dateString
  the <code>String</code> to be interpreted as a <code>Date</code>
  @param dateBackwardCompatibility
  <code>true</code> to correct Date values that may have been written
  using versions of this library prior to 0.4.0; otherwise, <code>false</code>
  
  @return the corresponding <code>Date</code> object