|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.itextpdf.xmp.XMPDateTimeFactory
public final class XMPDateTimeFactory
A factory to create XMPDateTime
-instances from a Calendar
or an
ISO 8601 string or for the current time.
Method Summary | |
---|---|
static XMPDateTime |
convertToLocalTime(XMPDateTime dateTime)
Make sure a time is local. |
static XMPDateTime |
convertToUTCTime(XMPDateTime dateTime)
Make sure a time is UTC. |
static XMPDateTime |
create()
Creates an empty XMPDateTime -object. |
static XMPDateTime |
create(int year,
int month,
int day)
Creates an XMPDateTime -object from initial values. |
static XMPDateTime |
create(int year,
int month,
int day,
int hour,
int minute,
int second,
int nanoSecond)
Creates an XMPDateTime -object from initial values. |
static XMPDateTime |
createFromCalendar(Calendar calendar)
Creates an XMPDateTime from a Calendar -object. |
static XMPDateTime |
createFromISO8601(String strValue)
Creates an XMPDateTime from an ISO 8601 string. |
static XMPDateTime |
getCurrentDateTime()
Obtain the current date and time. |
static XMPDateTime |
setLocalTimeZone(XMPDateTime dateTime)
Sets the local time zone without touching any other Any existing time zone value is replaced, the other date/time fields are not adjusted in any way. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static XMPDateTime createFromCalendar(Calendar calendar)
XMPDateTime
from a Calendar
-object.
calendar
- a Calendar
-object.
XMPDateTime
-object.public static XMPDateTime create()
XMPDateTime
-object.
XMPDateTime
-object.public static XMPDateTime create(int year, int month, int day)
XMPDateTime
-object from initial values.
year
- yearsmonth
- months from 1 to 12Calendar
is defined from 0 to 11.day
- days
XMPDateTime
-object.public static XMPDateTime create(int year, int month, int day, int hour, int minute, int second, int nanoSecond)
XMPDateTime
-object from initial values.
year
- yearsmonth
- months from 1 to 12Calendar
is defined from 0 to 11.day
- dayshour
- hoursminute
- minutessecond
- secondsnanoSecond
- nanoseconds
XMPDateTime
-object.public static XMPDateTime createFromISO8601(String strValue) throws XMPException
XMPDateTime
from an ISO 8601 string.
strValue
- The ISO 8601 string representation of the date/time.
XMPDateTime
-object.
XMPException
- When the ISO 8601 string is non-conformpublic static XMPDateTime getCurrentDateTime()
public static XMPDateTime setLocalTimeZone(XMPDateTime dateTime)
dateTime
- the XMPDateTime
variable containing the value to be modified.
XMPDateTime
-object.public static XMPDateTime convertToUTCTime(XMPDateTime dateTime)
dateTime
- the XMPDateTime
variable containing the time to
be modified.
XMPDateTime
-object.public static XMPDateTime convertToLocalTime(XMPDateTime dateTime)
dateTime
- the XMPDateTime
variable containing the time to be modified.
XMPDateTime
-object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |