Document date issues

The “document date” property feels like it’s not working as reliably as it used to. I have used it for a long time as part of a script that auto-renames letters, and it seemed in the past to get the right date 95% of the time. With a letter, the right date is nearly always the first date to appear in the doc (being in the header before the main text of the letter). Now it seems to be returning others, sometimes the last date to appear (even of many), so that it’s much less often the date of the letter itself.

I can’t use earliest or latest as letters often refer to both past and future dates (we refer to your letter of x; please reply by y; etc). Is there any way to return the first date that appears?

There isn’t enough information to go on here.
In a quick test, the document date was picked up correctly.

  • What version of macOS and DEVONthink are you running?
  • What is the date format in the problematic documents ?
  • What types of files are the problematic ones?

macOS 13.2.1
DEVONthink 3.9 (Pro)
PDFs

Attached is a sample letter. Document date should be 1 April 2023 (the first to appear in the doc) but it uses 1 January 2020 (the second)

Microsoft Word - Document3.pdf (59.4 KB)

PS I see that when converting to plain text the date of the letter appears at the end. So maybe it’s a glitch in the PDF parsing? If I export it to plain text from Nitro PDF Pro the date is in the right place.

The conversion is handled by macOS’ PDFkit framework and the result is the same in Preview.app. Did this change after upgrading to Ventura?

That is entirely possible. It’s taken me a while to notice how much it’s been happening, so I can’t say when it really started.

To complicate this, it doesn’t only happen because of PDF conversion issues. Putting the following into a plain text file in DT returns a “document date” of 24/2/23, when it should be 22 April 2023 (replicating order from a PDF that was wrongly dated but that I can’t share).

To:
Jessie Friendly
Lucy Messy
Dear Sirs/Madams
Case: 1/3/4/1 (T)
Friendly Solicitors LLP
Messy Litigation LLP
22 April 2023
(for the Claimant) (for the Defendants)
David v Goliath
I refer to the letter of the Tribunal dated 24 February 2023 listing a hearing for 11 May 2023 and the correspondence dated 10 March 2023 from the solicitors for the Claimant making an application for certain relief.
The application will be decided at the hearing.
Thank you.
Yours faithfully
Amy Namey
For the Registrar

I just tried this using version 3.9 and 22. April 2023 was returned as expected. How exactly did you use the document date? Which system language do you use?

Sorry, I think you’re right. It’s perhaps a (relatively recent) glitch in the PDF conversion.

Using your text in a new document…

US English system - DT running in system default language