Skip to content

PdfJsDateString.toDateObject method

PdfJsDateString › toDateObject

Unofficial

Converts a PDF date string to a date.

Signature:

toDateObject(input: string | null | undefined): Date | null

Parameters:

ParameterTypeDescription
inputstring | null | undefinedThe PDF date string, e.g. D:20240102030405Z.

Returns: Date | nullThe date, or null when the string cannot be parsed.