|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.itextpdf.xmp.impl.ISO8601Converter
public final class ISO8601Converter
Converts between ISO 8601 Strings and Calendar with millisecond resolution.
| Method Summary | |
|---|---|
static XMPDateTime |
parse(String iso8601String)
Converts an ISO 8601 string to an XMPDateTime. |
static XMPDateTime |
parse(String iso8601String,
XMPDateTime binValue)
|
static String |
render(XMPDateTime dateTime)
Converts a Calendar into an ISO 8601 string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static XMPDateTime parse(String iso8601String)
throws XMPException
XMPDateTime.
Parse a date according to ISO 8601 and
http://www.w3.org/TR/NOTE-datetime:
Note: Tolerate missing TZD, assume is UTC. Photoshop 8 writes
dates like this for exif:GPSTimeStamp.
Note: DOES NOT APPLY ANYMORE.
Tolerate missing date portion, in case someone foolishly
writes a time-only value that way.
iso8601String - a date string that is ISO 8601 conform.
Calendar.
XMPException - Is thrown when the string is non-conform.
public static XMPDateTime parse(String iso8601String,
XMPDateTime binValue)
throws XMPException
iso8601String - a date string that is ISO 8601 conform.binValue - an existing XMPDateTime to set with the parsed date
XMPException - Is thrown when the string is non-conform.public static String render(XMPDateTime dateTime)
Calendar into an ISO 8601 string.
Format a date according to ISO 8601 and http://www.w3.org/TR/NOTE-datetime:
Note: ISO 8601 does not seem to allow years less than 1000 or greater than 9999. We allow any year, even negative ones. The year is formatted as "%.4d".
Note: Fix for bug 1269463 (silently fix out of range values) included in parsing. The quasi-bogus "time only" values from Photoshop CS are not supported.
dateTime - an XMPDateTime-object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||