public final class XMPDateTimeFactory
extends java.lang.Object
XMPDateTime-instances from a Calendar or an
ISO 8601 string or for the current time.| Modifier and Type | Method and Description |
|---|---|
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(java.util.Calendar calendar)
Creates an
XMPDateTime from a Calendar-object. |
static XMPDateTime |
createFromISO8601(java.lang.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.
|
public static XMPDateTime createFromCalendar(java.util.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 - daysXMPDateTime-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 - nanosecondsXMPDateTime-object.public static XMPDateTime createFromISO8601(java.lang.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.Copyright © 2010 - 2023 Adobe. All Rights Reserved