Class XMPDateTimeFactory
A factory to create
XMPDateTime
-instances from a Calendar
or an
ISO 8601 string or for the current time.
public sealed class XMPDateTimeFactory
- Inheritance
-
XMPDateTimeFactory
- Inherited Members
Methods
ConvertToLocalTime(XMPDateTime)
Make sure a time is local.
public static XMPDateTime ConvertToLocalTime(XMPDateTime dateTime)
Parameters
dateTime
XMPDateTimethe
variable containing the time to be modified.XMPDateTime
Returns
- XMPDateTime
Returns an updated
-object.XMPDateTime
Remarks
Make sure a time is local. If the time zone is not the local zone, the time is adjusted and the time zone set to be local.
ConvertToUTCTime(XMPDateTime)
Make sure a time is UTC.
public static XMPDateTime ConvertToUTCTime(XMPDateTime dateTime)
Parameters
dateTime
XMPDateTimethe
variable containing the time to be modified.XMPDateTime
Returns
- XMPDateTime
Returns an updated
-object.XMPDateTime
Remarks
Make sure a time is UTC. If the time zone is not UTC, the time is adjusted and the time zone set to be UTC.
Create()
Creates an empty
XMPDateTime
-object.
public static XMPDateTime Create()
Returns
- XMPDateTime
Returns an
-object.XMPDateTime
Create(int, int, int)
Creates an
XMPDateTime
-object from initial values.
public static XMPDateTime Create(int year, int month, int day)
Parameters
year
intyears
month
intmonths from 1 to 12
Note: Remember that the month in DateTime is defined from 0 to 11.day
intdays
Returns
- XMPDateTime
Returns an
-object.XMPDateTime
Create(int, int, int, int, int, int, int)
Creates an
XMPDateTime
-object from initial values.
public static XMPDateTime Create(int year, int month, int day, int hour, int minute, int second, int nanoSecond)
Parameters
year
intyears
month
intmonths from 1 to 12
Note: Remember that the month in DateTime is defined from 0 to 11.day
intdays
hour
inthours
minute
intminutes
second
intseconds
nanoSecond
intnanoseconds
Returns
- XMPDateTime
Returns an
-object.XMPDateTime
CreateFromCalendar(XMPCalendar)
Creates an
XMPDateTime
from a Calendar
-object.
public static XMPDateTime CreateFromCalendar(XMPCalendar calendar)
Parameters
calendar
XMPCalendara
-object.Calendar
Returns
- XMPDateTime
An
-object.XMPDateTime
CreateFromISO8601(string)
Creates an
XMPDateTime
from an ISO 8601 string.
public static XMPDateTime CreateFromISO8601(string strValue)
Parameters
strValue
stringThe ISO 8601 string representation of the date/time.
Returns
- XMPDateTime
An
-object.XMPDateTime
GetCurrentDateTime()
Obtain the current date and time.
public static XMPDateTime GetCurrentDateTime()
Returns
- XMPDateTime
Returns The returned time is UTC, properly adjusted for the local time zone. The resolution of the time is not guaranteed to be finer than seconds.
SetLocalTimeZone(XMPDateTime)
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 SetLocalTimeZone(XMPDateTime dateTime)
Parameters
dateTime
XMPDateTimethe
variable containing the value to be modified.XMPDateTime
Returns
- XMPDateTime
Returns an updated
-object.XMPDateTime