MCPcopy Create free account
hub / github.com/w3c/epubcheck / parse

Method parse

src/main/java/com/adobe/epubcheck/util/DateParser.java:316–329  ·  view source on GitHub ↗

@param iso8601DateAsString The date parameter as a String. @return The corresponding Date object representing the result of parsing the date parameter. @throws InvalidDateException In case of an invalid date.

(String iso8601DateAsString)

Source from the content-addressed store, hash-verified

314 * @throws InvalidDateException In case of an invalid date.
315 */
316 public Date parse(String iso8601DateAsString) throws
317 InvalidDateException
318 {
319 Calendar calendar = getCalendar(iso8601DateAsString);
320 try
321 {
322 calendar.setLenient(false);
323 return calendar.getTime();
324 }
325 catch (Exception e)
326 {
327 throw new InvalidDateException(iso8601DateAsString + " " + e.getClass().toString() + " " + e.getMessage());
328 }
329 }
330}

Callers 2

endElementMethod · 0.95
testisISO8601DateMethod · 0.95

Calls 3

getCalendarMethod · 0.95
getMessageMethod · 0.65
toStringMethod · 0.45

Tested by 1

testisISO8601DateMethod · 0.76