Class PDFNet.Date
PDFNet.Date
Constructor Attributes | Constructor Name and Description |
---|---|
PDFNet.Date(year, month, day, hour, minute, second, UT, UT_hour, UT_minutes, mp_obj)
The Date class is a utility class used to simplify work with PDF date objects.
|
Method Attributes | Method Name and Description |
---|---|
assign(right)
Assignment operator
|
|
attach(d)
attach the Cos/SDF object to the Date.
|
|
<static> |
PDFNet.Date.init(year, month, day, hour, minute, second)
Create a Date and initialize it using specified parameters.
|
isValid()
Indicates whether the Date is valid (non-null).
|
|
update(d)
Saves changes made to the Date object in the attached (or specified) SDF/Cos string.
|
Class Detail
PDFNet.Date(year, month, day, hour, minute, second, UT, UT_hour, UT_minutes, mp_obj)
The Date class is a utility class used to simplify work with PDF date objects.
PDF defines a standard date format, which closely follows international
standard ASN.1 (Abstract Syntax Notation One), A date is a string of the form
(D:YYYYMMDDHHmmSSOHH'mm'); See PDF Reference Manual for details.
Date can be associated with a SDF/Cos date string using Date(Obj*) constructor
or later using Date::Attach(Obj*) or Date::Update(Obj*) methods.
Date keeps a local date/time cache so it is necessary to call Date::Update()
method if the changes to the Date should be saved in the attached Cos/SDF string.
- Parameters:
- year
- month
- day
- hour
- minute
- second
- UT
- UT_hour
- UT_minutes
- mp_obj
Method Detail
assign(right)
Assignment operator
- Parameters:
- {date} right
- (generated documentation)
attach(d)
attach the Cos/SDF object to the Date.
- Parameters:
- {Obj} d
- underlying Cos/SDF object. Must be an SDF::Str containing a PDF date object.
<static>
{date}
PDFNet.Date.init(year, month, day, hour, minute, second)
Create a Date and initialize it using specified parameters.
The Date is not attached to any Cos/SDF object.
- Parameters:
- {number} year
- number representing the year to initialize the Date object to.
- {number} month
- number representing the month to initialize the Date object to.
- {number} day
- number representing the day to initialize the Date object to.
- {number} hour
- number representing the hour to initialize the Date object to.
- {number} minute
- number representing the minute to initialize the Date object to.
- {number} second
- number representing the second to initialize the Date object to.
- Returns:
- {date} A promise that resolves to an object of type: "date" (generated documentation)
{boolean}
isValid()
Indicates whether the Date is valid (non-null).
- Returns:
- {boolean} A promise that resolves to true if this is a valid (non-null) Date; otherwise false.
{boolean}
update(d)
Saves changes made to the Date object in the attached (or specified) SDF/Cos string.
- Parameters:
- {Obj} d
- an optional parameter indicating a SDF string that should be updated and attached to this Date. If parameter d is NULL or is omitted, update is performed on previously attached Cos/SDF date.
- Returns:
- {boolean} A promise that resolves to true if the attached Cos/SDF string was successfully updated, false otherwise.