public class PdfDate extends PdfObjectWrapper<PdfString>
PdfDate is the PDF date object.
PDF defines a standard date format. The PDF date format closely follows the format
defined by the international standard ASN.1 (Abstract Syntax Notation One, defined
in CCITT X.208 or ISO/IEC 8824). A date is a PdfString of the form:
(D:YYYYMMDDHHmmSSOHH'mm')
See also ISO-320001 7.9.4, "Dates".
PdfString,
GregorianCalendar| Constructor and Description |
|---|
PdfDate()
Constructs a
PdfDate-object, representing the current day and time. |
PdfDate(Calendar d)
Constructs a
PdfDate-object. |
| Modifier and Type | Method and Description |
|---|---|
static Calendar |
decode(String s)
Converts a PDF string representing a date into a
Calendar. |
String |
getW3CDate()
Gives the W3C format of the PdfDate.
|
static String |
getW3CDate(String d)
Gives the W3C format of the
PdfDate. |
protected boolean |
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the
resultant document.
|
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidReleasepublic PdfDate(Calendar d)
PdfDate-object.d - the date that has to be turned into a PdfDate >-objectpublic PdfDate()
PdfDate-object, representing the current day and time.public String getW3CDate()
public static String getW3CDate(String d)
PdfDate.d - the date in the format D:YYYYMMDDHHmmSSOHH'mm'public static Calendar decode(String s)
Calendar.s - the PDF string representing a dateCalendar representing the date or null if the string
was not a dateprotected boolean isWrappedObjectMustBeIndirect()
PdfObjectWrapperisWrappedObjectMustBeIndirect in class PdfObjectWrapper<PdfString>Copyright © 1998–2024 Apryse Group NV. All rights reserved.