| java.lang.Object | |
| ↳ | com.pdftron.pdf.Date | 
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.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 
        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. 
  
   | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static Date | __Create(long impl) | ||||||||||
| long | __GetHandle() | ||||||||||
| void | 
        attach(Obj d)
        
         Attach the Cos/SDF object to the Date. 
  
   | ||||||||||
| boolean | equals(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 | seUTMinutes(byte ut_minutes) | ||||||||||
| 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 | 
        setUTMinutes(byte ut_minutes)
        
         Set the absolute value of the offset from UT in minutes(00-59) 
  
   | ||||||||||
| void | 
        setYear(short year)
        
         Set the year. 
  
   | ||||||||||
| boolean | 
        update(Obj d)
        
         Saves changes made to the Date object in the attached(or specified) SDF/Cos string. 
  
   | ||||||||||
| boolean | 
        update()
        
         Saves changes made to the Date object in the attached(or specified) SDF/Cos string. 
  
   | ||||||||||
| 
  [Expand]
   Inherited Methods  | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
   
From class
  java.lang.Object
 | |||||||||||
Create a Date and initialize it using given Cos/SDF string date object. String date object is attached to this Date.
| d | input string date object | 
|---|
| PDFNetException | 
|---|
Create a Date and initialize it using specified parameters. The Date is not attached to any Cos/SDF object.
| PDFNetException | 
|---|
Attach the Cos/SDF object to the Date.
| d | - underlying Cos/SDF object. Must be an SDF::Str containing a PDF date object. | 
|---|
| PDFNetException | 
|---|
Get the relationship of local time to Universal Time(UT), denoted by one of the characters +, -, or Z
| PDFNetException | 
|---|
Get the absolute value of the offset from UT in hours(00-23)
| PDFNetException | 
|---|
Get the absolute value of the offset from UT in minutes(00-59)
| PDFNetException | 
|---|
Indicates whether the Date is valid(non-null).
Note: If this method returns false the underlying SDF/Cos object is null and the Date object should be treated as null as well.
| PDFNetException | 
|---|
Set the current time.
Set the relationship of local time to Universal Time(UT),
| ut | the relationship of local time to Universal Time(UT), | 
|---|
| PDFNetException | 
|---|
Set the absolute value of the offset from UT in hours(00-23)
| ut_hour | the absolute value of the offset from UT in hours(00-23) | 
|---|
| PDFNetException | 
|---|
Set the absolute value of the offset from UT in minutes(00-59)
| ut_minutes | the absolute value of the offset from UT in minutes(00-59) | 
|---|
| PDFNetException | 
|---|
Saves changes made to the Date object in the attached(or specified) SDF/Cos string.
| 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. | 
|---|
| PDFNetException | 
|---|
Saves changes made to the Date object in the attached(or specified) SDF/Cos string.
| PDFNetException | 
|---|