docinfo_from_xmp()
fails on reduced precision dates (YYYY
/ YYYY-MM
)
#576
Labels
docinfo_from_xmp()
fails on reduced precision dates (YYYY
/ YYYY-MM
)
#576
docinfo_from_xmp()
returns an exception when given a reduced precision date (YYYY
/YYYY-MM
).Investigation
From the documentation of Adobe about the
Date
XMP data type:However pikepdf uses
datetime.fromisoformat()
, which according to Python's documentation doesn't support theYYYY
andYYYY-MM
date formats:How to reproduce
Example 1
Output:
Example 2
Output:
The text was updated successfully, but these errors were encountered: