public interface XMPDateTime extends Comparable
XMPDateTime
-class represents a point in time up to a resolution of nano seconds. Dates and time in the serialized XMP are ISO 8601 strings. There are utility functions to convert to the ISO format, a Calendar
or get the Timezone. The fields of XMPDateTime
are:
TimeZone
-object. Modifier and Type | Method and Description |
---|---|
Calendar |
getCalendar() |
int |
getDay() |
int |
getHour() |
String |
getISO8601String() |
int |
getMinute() |
int |
getMonth() |
int |
getNanoSecond() |
int |
getSecond() |
TimeZone |
getTimeZone() |
int |
getYear() |
boolean |
hasDate()
This flag is set either by parsing or by setting year, month or day.
|
boolean |
hasTime()
This flag is set either by parsing or by setting hours, minutes, seconds or milliseconds.
|
boolean |
hasTimeZone()
This flag is set either by parsing or by setting hours, minutes, seconds or milliseconds.
|
void |
setDay(int day) |
void |
setHour(int hour) |
void |
setMinute(int minute) |
void |
setMonth(int month) |
void |
setNanoSecond(int nanoSecond) |
void |
setSecond(int second) |
void |
setTimeZone(TimeZone tz) |
void |
setYear(int year) |
compareTo
int getYear()
void setYear(int year)
year
- Sets the year
int getMonth()
void setMonth(int month)
month
- Sets the month 1..12
int getDay()
void setDay(int day)
day
- Sets the day 1..31
int getHour()
void setHour(int hour)
hour
- Sets the hour in the range 0..23.
int getMinute()
void setMinute(int minute)
minute
- Sets the minute in the range 0..59.
int getSecond()
void setSecond(int second)
second
- Sets the second in the range 0..59.
int getNanoSecond()
void setNanoSecond(int nanoSecond)
nanoSecond
- Sets the milli-, micro- and nano seconds. Granularity goes down to milli seconds.
TimeZone getTimeZone()
void setTimeZone(TimeZone tz)
tz
- a time zone to set
boolean hasDate()
boolean hasTime()
boolean hasTimeZone()
Calendar getCalendar()
Calendar
(only with milli second precision).
String getISO8601String()
Copyright © 1998–2020 iText Group NV. All rights reserved.