java.io.Serializablepublic class PdfDate extends 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')
This object is described in the 'Portable Document Format Reference Manual version 1.3' section 7.2 (page 183-184)
PdfString,
GregorianCalendar,
Serialized FormARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, indRef, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, typeencoding, hexWriting, objGen, objNum, originalValue, value| Constructor | Description |
|---|---|
PdfDate() |
Constructs a
PdfDate-object, representing the current day and time. |
PdfDate(java.util.Calendar d) |
Constructs a
PdfDate-object. |
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.Calendar |
decode(java.lang.String s) |
Converts a PDF string representing a date into a Calendar.
|
java.lang.String |
getW3CDate() |
Gives the W3C format of the PdfDate.
|
static java.lang.String |
getW3CDate(java.lang.String d) |
Gives the W3C format of the PdfDate.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanBeInObjStm, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, typegetBytes, getEncoding, getOriginalBytes, isHexWriting, setHexWriting, toPdf, toString, toUnicodeStringpublic PdfDate(java.util.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 java.lang.String getW3CDate()
public static java.lang.String getW3CDate(java.lang.String d)
d - the date in the format D:YYYYMMDDHHmmSSOHH'mm'public static java.util.Calendar decode(java.lang.String s)
s - the PDF string representing a dateCalendar representing the date or null if the string
was not a dateCopyright © 1998–2018. All rights reserved.