public class Date
extends java.lang.Object
| Constructor and Description |
|---|
Date()
Date default constructor.
|
Date(Obj d)
Create a Date and initialize it using given Cos/SDF string date object.
|
Date(short year,
byte month,
byte day,
byte hour,
byte minute,
byte second)
Create a Date and initialize it using specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
static Date |
__Create(long impl) |
long |
__GetHandle() |
void |
attach(Obj d)
Attach the Cos/SDF object to the Date.
|
boolean |
equals(java.lang.Object other) |
byte |
getDay()
Get the day.
|
byte |
getHour()
Get the hour.
|
byte |
getMinute()
Get the minute.
|
byte |
getMonth()
Get the month.
|
byte |
getSecond()
Get the second.
|
byte |
getUT()
Get the relationship of local time to Universal Time (UT), denoted by one
of the characters +, -, or Z
|
byte |
getUTHour()
Get the absolute value of the offset from UT in hours (00-23)
|
byte |
getUTMinutes()
Get the absolute value of the offset from UT in minutes (00-59)
|
short |
getYear()
Get the year.
|
int |
hashCode() |
boolean |
isValid()
Indicates whether the Date is valid (non-null).
|
void |
setCurrentTime()
Set the current time.
|
void |
setDay(byte day)
Set the day.
|
void |
setHour(byte hour)
Set the hour.
|
void |
setMinute(byte minute)
Set the minute.
|
void |
setMonth(byte month)
Set the month.
|
void |
setSecond(byte second)
Set the second.
|
void |
setUT(byte ut)
Set the relationship of local time to Universal Time (UT),
|
void |
setUTHour(byte ut_hour)
Set the absolute value of the offset from UT in hours (00-23)
|
void |
setYear(short year)
Set the year.
|
void |
seUTMinutes(byte ut_minutes)
Set the absolute value of the offset from UT in minutes (00-59)
|
boolean |
update()
Saves changes made to the Date object in the attached (or specified) SDF/Cos string.
|
boolean |
update(Obj d)
Saves changes made to the Date object in the attached (or specified) SDF/Cos string.
|
public Date()
throws PDFNetException
PDFNetExceptionpublic Date(Obj d) throws PDFNetException
d - input string date objectPDFNetExceptionpublic Date(short year,
byte month,
byte day,
byte hour,
byte minute,
byte second)
throws PDFNetException
year - month - day - hour - minute - second - PDFNetExceptionpublic boolean isValid()
throws PDFNetException
PDFNetExceptionpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic void attach(Obj d) throws PDFNetException
d - - underlying Cos/SDF object. Must be an SDF::Str containing
a PDF date object.PDFNetExceptionpublic boolean update()
throws PDFNetException
PDFNetExceptionpublic boolean update(Obj d) throws PDFNetException
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.PDFNetExceptionpublic void setCurrentTime()
public short getYear()
throws PDFNetException
PDFNetExceptionpublic byte getMonth()
throws PDFNetException
PDFNetExceptionpublic byte getDay()
throws PDFNetException
PDFNetExceptionpublic byte getHour()
throws PDFNetException
PDFNetExceptionpublic byte getMinute()
throws PDFNetException
PDFNetExceptionpublic byte getSecond()
throws PDFNetException
PDFNetExceptionpublic byte getUT()
throws PDFNetException
PDFNetExceptionpublic byte getUTHour()
throws PDFNetException
PDFNetExceptionpublic byte getUTMinutes()
throws PDFNetException
PDFNetExceptionpublic void setYear(short year)
throws PDFNetException
year - the new yearPDFNetExceptionpublic void setMonth(byte month)
throws PDFNetException
month - the new monthPDFNetExceptionpublic void setDay(byte day)
throws PDFNetException
day - the new dayPDFNetExceptionpublic void setHour(byte hour)
throws PDFNetException
hour - the new hourPDFNetExceptionpublic void setMinute(byte minute)
throws PDFNetException
minute - the new minutePDFNetExceptionpublic void setSecond(byte second)
throws PDFNetException
second - the new secondPDFNetExceptionpublic void setUT(byte ut)
throws PDFNetException
ut - the relationship of local time to Universal Time (UT),PDFNetExceptionpublic void setUTHour(byte ut_hour)
throws PDFNetException
ut_hour - the absolute value of the offset from UT in hours (00-23)PDFNetExceptionpublic void seUTMinutes(byte ut_minutes)
throws PDFNetException
ut_minutes - the absolute value of the offset from UT in minutes (00-59)PDFNetExceptionpublic static Date __Create(long impl)
public long __GetHandle()