Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.2.0
    • Component/s: Parsing
    • Labels:
      None

      Description

      I've copied the desctiption from PDFBOX-643, as that issue is already closed.

      The issue is there are many different date formats used.
      The list in org.apache.pdfbox.util.DateConverter.java needs to be expanded to cover many different formats.

      PDFBOX-164 Error converting date:5/12/2005 15:57:16 (UNRESOLVED)
      + new SimpleDateFormat("d/MM/yyyy hh:mm:ss") // PDFBOX-164

      PDFBOX-170 requires this format. Error converting date:27/10/2005 14:59:39 (UNRESOLVED)

      + new SimpleDateFormat("dd/MM/yyyy hh:mm:ss") // PDFBOX-170

      PDFBOX-465 requires this format Error converting date:Friday, July 11, 2008 (UNRESOLVED)
      + new SimpleDateFormat("EEEEEEEEEE, MMMMMMMMMMMM dd, yyyy") // Friday, July 11, 2008

      PDFBOX-643 requires theses formats (this was patched already)
      + new SimpleDateFormat("MM/dd/yyyy"),
      + new SimpleDateFormat("EEEE, MMM dd, yyyy"), // Acrobat Distiller 1.0.2 for Macintosh
      + new SimpleDateFormat("EEEE MMM dd, yyyy HH:mm:ss"), // ECMP5
      + new SimpleDateFormat("EEEE MMM dd HH:mm:ss z yyyy"), // GNU Ghostscript 7.0.7
      + new SimpleDateFormat("EEEE, MMM dd, yyyy 'at' hh:mma") // Acrobat Net Distiller 1.0 for Windows

      A message that didn't open a project needs this this format,
      http://www.mail-archive.com/pdfbox-users@incubator.apache.org/msg00531.html
      new SimpleDateFormat("dd MMM yyyy hh:mm:ss"), // for 26 May 2000 11:25:00
      new SimpleDateFormat("dd MMM yyyy hh:mm"), // for 26 May 2000 11:25

      I also posted several formats as an attachment to PDFBOX-465 which were in PDF documents I was trying to parse.

      new SimpleDateFormat("M/dd/yyyy hh:mm:ss"),
      new SimpleDateFormat("MM/d/yyyy hh:mm:ss"),
      new SimpleDateFormat("M/dd/yyyy"),
      new SimpleDateFormat("MM/d/yyyy"),

      new SimpleDateFormat("M/d/yyyy hh:mm:ss"),
      new SimpleDateFormat("M/d/yyyy"),
      new SimpleDateFormat("M/d/yy hh:mm:ss"),
      new SimpleDateFormat("M/d/yy"),

      new SimpleDateFormat("yyyymmdd hh:mm:ss Z"), //
      new SimpleDateFormat("yyyymmdd hh:mm:ss"), //
      new SimpleDateFormat("yyyymmdd hh:mm:ss Z"), //
      // 24 hour format
      new SimpleDateFormat("yyyymmdd'+00''00'''"), //
      new SimpleDateFormat("yyyymmdd'+01''00'''"), //
      new SimpleDateFormat("yyyymmdd'+02''00'''"), //
      new SimpleDateFormat("yyyymmdd'+03''00'''"), //
      new SimpleDateFormat("yyyymmdd'+04''00'''"), //
      new SimpleDateFormat("yyyymmdd'+05''00'''"), //
      new SimpleDateFormat("yyyymmdd'+06''00'''"), //
      new SimpleDateFormat("yyyymmdd'+07''00'''"), //
      new SimpleDateFormat("yyyymmdd'+08''00'''"), //
      new SimpleDateFormat("yyyymmdd'+09''00'''"), //
      new SimpleDateFormat("yyyymmdd'+10''00'''"), //
      new SimpleDateFormat("yyyymmdd'+11''00'''"), //
      new SimpleDateFormat("yyyymmdd'+12''00'''"), //
      new SimpleDateFormat("yyyymmdd'-01''00'''"), //
      new SimpleDateFormat("yyyymmdd'-02''00'''"), //
      new SimpleDateFormat("yyyymmdd'-03''00'''"), //
      new SimpleDateFormat("yyyymmdd'-04''00'''"), //
      new SimpleDateFormat("yyyymmdd'-05''00'''"), //
      new SimpleDateFormat("yyyymmdd'-06''00'''"), //
      new SimpleDateFormat("yyyymmdd'-07''00'''"), //
      new SimpleDateFormat("yyyymmdd'-08''00'''"), //
      new SimpleDateFormat("yyyymmdd'-09''00'''"), //
      new SimpleDateFormat("yyyymmdd'-10''00'''"), //
      new SimpleDateFormat("yyyymmdd'-11''00'''"), //
      new SimpleDateFormat("yyyymmdd'-12''00'''"), //
      new SimpleDateFormat("yyyymmdd"), // for 20090401+0200

        Issue Links

          Activity

          Hide
          Andreas Lehmkühler added a comment -

          I've applied the patch with version 938604.

          Thanks to Peter for the contribution

          Show
          Andreas Lehmkühler added a comment - I've applied the patch with version 938604. Thanks to Peter for the contribution
          Hide
          Andreas Lehmkühler added a comment -

          I've copied the attachement from PDFBOX-643

          Show
          Andreas Lehmkühler added a comment - I've copied the attachement from PDFBOX-643

            People

            • Assignee:
              Unassigned
              Reporter:
              Andreas Lehmkühler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development