Hi Lukasz.
Hi i have one question about PDF_TIME_FORMAT_PDF.
In pdf-time-string.c in begining of pdf_time_from_string_pdf is following
comment.
/*
* From PDF Reference 1.7: ( D:YYYYMMDDHHmmSSOHH'mm' )
* From ISO 32000: ( D:YYYYMMDDHHmmSSOHH'mm )
*
* Notes: Year is mandatory, all the other fields may appear if the
preceding
* also appear.
*
* D: = string "D:"
* YYYY = four-digit year
* MM = two-digit month (01=January, etc.)
* DD = two-digit day of month (01 through 31)
* HH = two digits of hour (00 through 23)
* mm = two digits of minute (00 through 59)
* SS = two digits of second (00 through 59)
* O = either '+', '-' or 'Z'
* HH = two digits of hour (00 through 23) for the GMT offset
* ' = string "'"
* MM = two digits of minute (00 through 59) for the GMT offset
* ' = string "'" (NOTE: Mandatory in 1.7, optional in ISO32000)
*/
Last ' character is mandatory in 1.7, but what with minor versions of pdf
files. Is last ' character mandatory also?. If no then
pdf_time_from_string_pdf must accept strings without '. Currently it don't
accept them.
According to the 7.9.4 section of ISO32000, the format of a date
should be:
(D:YYYYMMDDHHmmSSOHH'mm )
where the ' after the HH should be specified only if HH is specified.
As long as I understand that apostrophe is NOT allowed in ISO 32000
documents (Aleks, am I missing something?).
In consequence I would extend the function declaration to:
pdf_status_t
pdf_time_from_string_pdf (pdf_time_t time_var,
const pdf_char_t *time_str,
pdf_bool_t allow_trailing_apostrophe)
so the caller can have control on what kind of date formats to
support.
What do you think?
--
Jose E. Marchesi <[email protected]>
http://www.jemarch.net
GNU Project http://www.gnu.org