|
pdfmm 0.9.20
|
#include <PdfDate.h>
Public Member Functions | |
| PdfDate () | |
| PdfDate (const std::chrono::seconds &secondsFromEpoch, const nullable< std::chrono::minutes > &offsetFromUTC) | |
| PdfDate (const PdfString &date) | |
| const std::chrono::seconds & | GetSecondsFromEpoch () const |
| PdfString | ToString () const |
| PdfString | ToStringW3C () const |
This class is a date datatype as specified in the PDF reference. You can easily convert from Unix time_t to the PDF time representation and back. Dates like these are used for example in the PDF info dictionary for the creation time and date of the PDF file.
PdfDate objects are immutable.
From the PDF reference:
PDF defines a standard date format, which closely follows that of the international standard ASN.1 (Abstract Syntax Notation One), defined in ISO/IEC 8824 (see the Bibliography). A date is a string of the form (D:YYYYMMDDHHmmSSOHH'mm')
| PdfDate::PdfDate | ( | ) |
Create a PdfDate object with the current date and time.
| mm::PdfDate::PdfDate | ( | const std::chrono::seconds & | secondsFromEpoch, |
| const nullable< std::chrono::minutes > & | offsetFromUTC | ||
| ) |
Create a PdfDate with a specified date and time
| t | the date and time of this object |
| PdfDate::PdfDate | ( | const PdfString & | date | ) |
Create a PdfDate with a specified date and time
| szDate | the date and time of this object in PDF format. It has to be a string of the format (D:YYYYMMDDHHmmSSOHH'mm'). |
|
inline |
| PdfString PdfDate::ToString | ( | ) | const |
The value returned by this function can be used in any PdfObject where a date is needed
| PdfString PdfDate::ToStringW3C | ( | ) | const |
The value returned is a W3C compliant date representation