paperless-ng icon indicating copy to clipboard operation
paperless-ng copied to clipboard

[Feature] Use the newest date instead of the first date found in the document

Open yschroeder opened this issue 3 years ago • 4 comments

Many of my documents contain a birth date near the beginning of the document. This results in the wrong creation date (the birthday).

Instead, Paperless should look for the most recent date in the document. I think this will be correct more often, as documents normally only reference things that happened in the past.

Bonus points for a suggestion of different dates in the detailed document view (like for tags and document types...).

yschroeder avatar Feb 14 '22 11:02 yschroeder

Actually there is a parameter (PAPERLESS_IGNORE_DATES) that allows you to define certain dates (like birthdays etc) to be excluded.

isigmund avatar Feb 14 '22 12:02 isigmund

That will help a lot already. Thank you!

However, I think the idea to use the newest date is still valid.

yschroeder avatar Feb 14 '22 12:02 yschroeder

Fantastic idea! I find that the auto-detected date is almost always wrong on my scanned documents.

Perhaps an even better refinement of the idea would be to look for the most recent date that is not in the future.

Some documents do have dates in the future, e.g. a tax bill that contains a notice like "if paid after XYZ due date in the future, will incur xx% penalty".

joelnordell avatar Feb 19 '22 18:02 joelnordell

Perhaps an even better refinement of the idea would be to look for the most recent date that is not in the future.

Some documents do have dates in the future, e.g. a tax bill that contains a notice like "if paid after XYZ due date in the future, will incur xx% penalty".

I checked the code and it already ignores dates in the future. But that's a good idea nonetheless. However I can see use cases where people might create documents that are sent tomorrow and still want to put them into paperless. I think it should be configurable.

yschroeder avatar Feb 20 '22 23:02 yschroeder