|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lowagie.text.pdf.PdfObject
com.lowagie.text.pdf.PdfString
com.lowagie.text.pdf.PdfDate
public class PdfDate
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| Field Summary | |
|---|---|
private static int[] |
DATE_SPACE
|
| Fields inherited from class com.lowagie.text.pdf.PdfString |
|---|
encoding, hexWriting, objGen, objNum, originalValue, value |
| Fields inherited from class com.lowagie.text.pdf.PdfObject |
|---|
ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, indRef, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type |
| Constructor Summary | |
|---|---|
PdfDate()
Constructs a PdfDate-object, representing the current day and time. |
|
PdfDate(Calendar d)
Constructs a PdfDate-object. |
|
| Method Summary | |
|---|---|
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. |
private String |
setLength(int i,
int length)
Adds a number of leading zeros to a given String in order to get a String
of a certain length. |
| Methods inherited from class com.lowagie.text.pdf.PdfString |
|---|
decrypt, getBytes, getEncoding, getOriginalBytes, isHexWriting, setHexWriting, setObjNum, toPdf, toString, toUnicodeString |
| Methods inherited from class com.lowagie.text.pdf.PdfObject |
|---|
canBeInObjStm, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final int[] DATE_SPACE
| Constructor Detail |
|---|
public 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.
| Method Detail |
|---|
private String setLength(int i,
int length)
String in order to get a String
of a certain length.
i - a given numberlength - the length of the resulting String
Stringpublic String getW3CDate()
public static String getW3CDate(String d)
d - the date in the format D:YYYYMMDDHHmmSSOHH'mm'
public static Calendar decode(String s)
s - the PDF string representing a date
Calendar representing the date or null if the string
was not a date
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||