iText 8.0.2 API
iText.Kernel.XMP.XMPDateTimeFactory Class Reference

A factory to create More...

Static Public Member Functions

static XMPDateTime  CreateFromCalendar (XMPCalendar calendar)
  Creates an More...
 
static XMPDateTime  Create ()
  Creates an empty More...
 
static XMPDateTime  Create (int year, int month, int day)
  Creates an More...
 
static XMPDateTime  Create (int year, int month, int day, int hour, int minute, int second, int nanoSecond)
  Creates an More...
 
static XMPDateTime  CreateFromISO8601 (String strValue)
  Creates an More...
 
static XMPDateTime  GetCurrentDateTime ()
  Obtain the current date and time. More...
 
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. More...
 
static XMPDateTime  ConvertToUTCTime (XMPDateTime dateTime)
  Make sure a time is UTC. More...
 
static XMPDateTime  ConvertToLocalTime (XMPDateTime dateTime)
  Make sure a time is local. More...
 

Detailed Description

A factory to create

XMPDateTime-instances from a Calendar or an ISO 8601 string or for the current time.

16.02.2006

Member Function Documentation

◆ ConvertToLocalTime()

static XMPDateTime iText.Kernel.XMP.XMPDateTimeFactory.ConvertToLocalTime ( XMPDateTime  dateTime )
inlinestatic

Make sure a time is local.

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.

Parameters
dateTime the
XMPDateTime
variable containing the time to be modified.
Returns
Returns an updated
XMPDateTime
-object.

◆ ConvertToUTCTime()

static XMPDateTime iText.Kernel.XMP.XMPDateTimeFactory.ConvertToUTCTime ( XMPDateTime  dateTime )
inlinestatic

Make sure a time is UTC.

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.

Parameters
dateTime the
XMPDateTime
variable containing the time to be modified.
Returns
Returns an updated
XMPDateTime
-object.

◆ Create() [1/3]

static XMPDateTime iText.Kernel.XMP.XMPDateTimeFactory.Create ( )
inlinestatic

Creates an empty

XMPDateTime-object.

Returns
Returns an
XMPDateTime
-object.

◆ Create() [2/3]

static XMPDateTime iText.Kernel.XMP.XMPDateTimeFactory.Create ( int  year,
int  month,
int  day 
)
inlinestatic

Creates an

XMPDateTime-object from initial values.

Parameters
year years
month months from 1 to 12
Note: Remember that the month in System.DateTime is defined from 0 to 11.
day days
Returns
Returns an
XMPDateTime
-object.

◆ Create() [3/3]

static XMPDateTime iText.Kernel.XMP.XMPDateTimeFactory.Create ( int  year,
int  month,
int  day,
int  hour,
int  minute,
int  second,
int  nanoSecond 
)
inlinestatic

Creates an

XMPDateTime-object from initial values.

Parameters
year years
month months from 1 to 12
Note: Remember that the month in System.DateTime is defined from 0 to 11.
day days
hour hours
minute minutes
second seconds
nanoSecond nanoseconds
Returns
Returns an
XMPDateTime
-object.

◆ CreateFromCalendar()

static XMPDateTime iText.Kernel.XMP.XMPDateTimeFactory.CreateFromCalendar ( XMPCalendar  calendar )
inlinestatic

Creates an

XMPDateTime from a Calendar-object.

Parameters
calendar a
Calendar
-object.
Returns
An
XMPDateTime
-object.

◆ CreateFromISO8601()

static XMPDateTime iText.Kernel.XMP.XMPDateTimeFactory.CreateFromISO8601 ( String  strValue )
inlinestatic

Creates an

XMPDateTime from an ISO 8601 string.

Parameters
strValue The ISO 8601 string representation of the date/time.
Returns
An
XMPDateTime
-object.

◆ GetCurrentDateTime()

static XMPDateTime iText.Kernel.XMP.XMPDateTimeFactory.GetCurrentDateTime ( )
inlinestatic

Obtain the current date and time.

Returns
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()

static XMPDateTime iText.Kernel.XMP.XMPDateTimeFactory.SetLocalTimeZone ( XMPDateTime  dateTime )
inlinestatic

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.

Parameters
dateTime the
XMPDateTime
variable containing the value to be modified.
Returns
Returns an updated
XMPDateTime
-object.