Package com.adobe.xfa.ut
Class ISOTime
- java.lang.Object
-
- com.adobe.xfa.ut.LcTime
-
- com.adobe.xfa.ut.ISOTime
-
public final class ISOTime extends LcTime
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 ofISOTime
to reformat an ISO8601/XFA time stringimport 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
Constructors Constructor Description ISOTime()
Instantiate an ISOTime object from today's time.ISOTime(int millis)
Instantiate an ISOTime object from the given number of milliseconds from the epoch.ISOTime(java.lang.String locale, int centurySplit)
Instantiate an ISOTime object from today's time given a locale string and a possible century split year.ISOTime(java.lang.String time, java.lang.String locale)
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 Detail
-
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
public ISOTime(java.lang.String locale, int centurySplit)
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
public ISOTime(java.lang.String time, java.lang.String locale)
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.
-
-