Class PDFDateParser

    • Method Detail

      • parseDateString

        public static final Date parseDateString​(String pdfDate)
                                          throws ParseException
        Parses the provided PDF-format date string into a Date instance. If the date string is not properly formatted (there are some PDF generators that do not output proper dates in their documents), this method will throw an appropriate exception. If this happens, it is likely that the date string is formatted in a human-readable way (i.e. Friday, November 14, 2001, etc).
        Parameters:
        pdfDate - a PDF-format date string, retrieved via Document.getAttribute(String)
        Throws:
        ParseException - if the provided date string is not properly formatted.