Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Clarifying documentation on filename placeholders #1391

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

denilsonsa
Copy link

The documentation text now better describes what the code does. It is now clear that the time is not included, and that all date placeholders are either zero-padded or ISO-formatted.

created=datetime.date.isoformat(doc.created),
created_year=doc.created.year if doc.created else "none",
created_month=f"{doc.created.month:02}" if doc.created else "none", # NOQA: E501
created_day=f"{doc.created.day:02}" if doc.created else "none",
added=datetime.date.isoformat(doc.added),
added_year=doc.added.year if doc.added else "none",
added_month=f"{doc.added.month:02}" if doc.added else "none",
added_day=f"{doc.added.day:02}" if doc.added else "none",

The documentation text now better describes what the code does. It is now clear that the time is not included, and that all date placeholders are either zero-padded or ISO-formatted.

https://github.com/jonaswinkler/paperless-ng/blob/05c36f91cfa5613bdea5b3c490774cc40b586eeb/src/documents/file_handling.py#L164-L171
tribut pushed a commit to tribut/paperless-ng that referenced this pull request Aug 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant