Package com.adobe.xfa.ut
Class ISOTime
java.lang.Object
com.adobe.xfa.ut.LcTime
com.adobe.xfa.ut.ISOTime
The ISOTime class derives from LcTime to
define ISO8601/XFA time patterns.
Valid ISO8601/XFA time strings are in any one of the following time patterns:
- HH[MM[SS[.FFF][z]]]
- HH[MM[SS[.FFF][+HH[MM]]]]
- HH[MM[SS[.FFF][-HH[MM]]]]
- HH[:MM[:SS[.FFF][z]]]
- HH[:MM[:SS[.FFF][+HH[:MM]]]]
- HH[:MM[:SS[.FFF][-HH[:MM]]]]
LcTime for the meaning of the various metasymbols used above.
Here's a snippet of code illustrating the use of
ISOTime to reformat an ISO8601/XFA time string
import com.adobe.xfa.ut.ISOTime;
import com.adobe.xfa.ut.LcTime;
...
ISOTime t = new ISOTime("11:12:13-05:00", "");
fString s = "Unknown";
if (t.isValid())
s = t.format(LcTime.XFA_TIME_FMT1);
System.out.println(s);
-
Field Summary
Fields inherited from class com.adobe.xfa.ut.LcTime
DEFAULT_TIME_FMT, MILLISPERDAY, MILLISPERHOUR, MILLISPERMINUTE, MILLISPERSECOND, TIME_FMT1, TIME_FMT2, TIME_PICTURE_SYMBOLS -
Constructor Summary
ConstructorsConstructorDescriptionISOTime()Instantiate an ISOTime object from today's time.ISOTime(int millis) Instantiate an ISOTime object from the given number of milliseconds from the epoch.Instantiate an ISOTime object from today's time given a locale string and a possible century split year.Instantiate an ISOTime object from the given time string. -
Method Summary
Methods inherited from class com.adobe.xfa.ut.LcTime
add, asgn, format, getDays, getHour, getLocalTimeFormat, getMillis, getMilliSecond, getMinute, getSecond, getTimeFormat, getTimeZone, isValid, setGMTime, setLocalTime, toString
-
Constructor Details
-
ISOTime
public ISOTime()Instantiate an ISOTime object from today's time. -
ISOTime
public ISOTime(int millis) Instantiate an ISOTime object from the given number of milliseconds from the epoch. The epoch is such that millisecond 1 corresponds to midnight, 00:00:00 GMT.- Parameters:
millis- the number of milliseconds from epoch.
-
ISOTime
Instantiate an ISOTime object from today's time given a locale string and a possible century split year.- Parameters:
locale- a locale string. When empty, it will default to the current locale.centurySplit- a century split year.
-
ISOTime
Instantiate an ISOTime object from the given time string.- Parameters:
time- an ISO8601/XFA time string.locale- a locale string. When empty, it will default to the current locale.
-