Class Date
Set document's creation date.
Implements
Inherited Members
Namespace: pdftron.PDF
Assembly: PDFNet.dll
Syntax
public class Date : IDisposable
Constructors
Date()
Date default constructor.
Declaration
public Date()
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Date(short, byte, byte, byte, byte, byte)
Create a Date and initialize it using specified parameters. The Date is not attached to any Cos/SDF object.
Declaration
public Date(short year, byte month, byte day, byte hour, byte minute, byte second)
Parameters
Type | Name | Description |
---|---|---|
short | year | the year |
byte | month | the month |
byte | day | the day |
byte | hour | the hour |
byte | minute | the minute |
byte | second | the second |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Date(Date)
Declaration
public Date(Date d)
Parameters
Type | Name | Description |
---|---|---|
Date | d |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
Date(Obj)
Create a Date and initialize it using given Cos/SDF string date object. String date object is attached to this Date.
Declaration
public Date(Obj d)
Parameters
Type | Name | Description |
---|---|---|
Obj | d | the |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Properties
UT
The relationship of local time to Universal Time (UT), denoted by one of the characters +, -, or Z
Declaration
public byte UT { get; set; }
Property Value
Type | Description |
---|---|
byte |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
UT_hour
The absolute value of the offset from UT in hours (00-23)
Declaration
public byte UT_hour { get; set; }
Property Value
Type | Description |
---|---|
byte |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
UT_minutes
The absolute value of the offset from UT in minutes (00-59)
Declaration
public byte UT_minutes { get; set; }
Property Value
Type | Description |
---|---|
byte |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
day
The day (01-31).
Declaration
public byte day { get; set; }
Property Value
Type | Description |
---|---|
byte |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
hour
The hour (00-23).
Declaration
public byte hour { get; set; }
Property Value
Type | Description |
---|---|
byte |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
minute
The minute (00-59).
Declaration
public byte minute { get; set; }
Property Value
Type | Description |
---|---|
byte |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
month
The month.
Declaration
public byte month { get; set; }
Property Value
Type | Description |
---|---|
byte |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
second
The second (00-59).
Declaration
public byte second { get; set; }
Property Value
Type | Description |
---|---|
byte |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
year
The year.
Declaration
public short year { get; set; }
Property Value
Type | Description |
---|---|
short |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
Methods
Attach(Obj)
Attach the Cos/SDF object to the Date.
Declaration
public void Attach(Obj d)
Parameters
Type | Name | Description |
---|---|---|
Obj | d |
|
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Dispose()
Releases all resources used by the Date
Declaration
public override sealed void Dispose()
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
Dispose(bool)
Declaration
[HandleProcessCorruptedStateExceptions]
protected virtual void Dispose(bool A_0)
Parameters
Type | Name | Description |
---|---|---|
bool | A_0 |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
~Date()
Declaration
protected ~Date()
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
IsValid()
Indicates whether the Date is valid (non-null).
Declaration
public bool IsValid()
Returns
Type | Description |
---|---|
bool | True if this is a valid (non-null) Date; otherwise false. |
Remarks
If this method returns false the underlying SDF/Cos object is null and the Date object should be treated as null as well.
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
Set(Date)
Sets value to given Date
object
Declaration
public void Set(Date p)
Parameters
Type | Name | Description |
---|---|---|
Date | p | given |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
SetCurrentTime()
Sets the current time.
Declaration
public void SetCurrentTime()
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |
Update()
Saves changes made to the Date object in the attached (or specified) SDF/Cos string.
Declaration
public bool Update()
Returns
Type | Description |
---|---|
bool | true if the attached Cos/SDF string was successfully updated, false otherwise. |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
Update(Obj)
Update.
Declaration
public bool Update(Obj d)
Parameters
Type | Name | Description |
---|---|---|
Obj | d | the d |
Returns
Type | Description |
---|---|
bool | true, if successful |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
op_Assign(Date)
Assignment operator
Declaration
public Date op_Assign(Date r)
Parameters
Type | Name | Description |
---|---|---|
Date | r | object at the right of the operator |
Returns
Type | Description |
---|---|
Date | object equals to the given object |
Exceptions
Type | Condition |
---|---|
PDFNetException | PDFNetException the PDFNet exception |
PDFNetException | PDFNetException the PDFNet exception |