• Carlos Garcia Campos's avatar
    [glib] Add poppler_date_parse to parse PDF format date strings · 39d09fa2
    Carlos Garcia Campos authored
    We need to make this public because the field M in the Annot dictionary
    might be a Date string (in PDF date format) or a text string. According
    to the PDF spec: "The preferred format is a date string as described in
    Section 3.8.3, “Dates,” but viewer applications should be prepared to
    accept and display a string in any format". The only way to know whether
    it's a PDF date string or not, is by trying to parse it. For this reason
    poppler_annot_get_modified() returns a gchar * instead of a time_t. So,
    viewers should try to parse the string in order to convert it to a
    time_t, and if it fails to parse, use the date string as provided by the
poppler-date.h 1.01 KB