iText 7 7.1.9 API
iText.Kernel.Pdf.PdfDate Class Reference

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". More...

Inheritance diagram for iText.Kernel.Pdf.PdfDate:
iText.Kernel.Pdf.PdfObjectWrapper< PdfString >

Public Member Functions

  PdfDate (DateTime d)
  Constructs a PdfDate -object. More...
 
  PdfDate ()
  Constructs a PdfDate -object, representing the current day and time. More...
 
virtual String  GetW3CDate ()
  Gives the W3C format of the PdfDate. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfString >
virtual T  GetPdfObject ()
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document, PdfIndirectReference reference)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  SetModified ()
 
virtual void  Flush ()
 
virtual bool  IsFlushed ()
 

Static Public Member Functions

static String  GetW3CDate (String d)
  Gives the W3C format of the PdfDate More...
 
static DateTime  Decode (String s)
  Converts a PDF string representing a date into a DateTime More...
 

Detailed Description

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".

See also
PdfString, Java.Util.GregorianCalendar

Constructor & Destructor Documentation

◆ PdfDate() [1/2]

iText.Kernel.Pdf.PdfDate.PdfDate ( DateTime  d )
inline

Constructs a PdfDate -object.

Parameters
d the date that has to be turned into a PdfDate >-object

◆ PdfDate() [2/2]

iText.Kernel.Pdf.PdfDate.PdfDate ( )
inline

Constructs a PdfDate -object, representing the current day and time.

Member Function Documentation

◆ Decode()

static DateTime iText.Kernel.Pdf.PdfDate.Decode ( String  s )
inlinestatic

Converts a PDF string representing a date into a DateTime

Parameters
s the PDF string representing a date
Returns
a DateTime representing the date

◆ GetW3CDate() [1/2]

virtual String iText.Kernel.Pdf.PdfDate.GetW3CDate ( )
inlinevirtual

Gives the W3C format of the PdfDate.

Returns
a formatted date

◆ GetW3CDate() [2/2]

static String iText.Kernel.Pdf.PdfDate.GetW3CDate ( String  d )
inlinestatic

Gives the W3C format of the PdfDate

Parameters
d the date in the format D:YYYYMMDDHHmmSSOHH'mm'
Returns
a formatted date