Package com.adobe.xfa.ut
Class ISODate
- java.lang.Object
-
- com.adobe.xfa.ut.LcDate
-
- com.adobe.xfa.ut.ISODate
-
public final class ISODate extends LcDate
The ISODate class derives from LcDate to define ISO8601/XFA date patterns.Valid ISO8601/XFA date strings are in any one of the following date patterns:
- YYYY[-MM[-DD]]
- YYYY[MM[DD]]
LcDate
for the meaning of the various metasymbols used above. Here's a snippet of code illustrating the use ofISODate
to reformat an ISO8601/XFA date stringimport com.adobe.xfa.ut.ISODate; import com.adobe.xfa.ut.LcDate; ... ISODate d = new ISODate("2000-02-28", ""); String s = "Unknown"; if (d.isValid()) s = d.format(LcDate.XFA_TIME_FMT1); System.out.println(s);
-
-
Field Summary
-
Fields inherited from class com.adobe.xfa.ut.LcDate
DATE_FMT1, DATE_FMT2, DATE_PICTURE_SYMBOLS, DEFAULT_CENTURY_SPLIT, DEFAULT_DATE_FMT
-
-
Constructor Summary
Constructors Constructor Description ISODate()
Instantiate an ISODate object from today's date.ISODate(int days)
Instantiate an ISODate object from the given number of days from the epoch.ISODate(java.lang.String locale, int centurySplit)
Instantiate a ISODate object from today's date given a locale string and a possible century split year.ISODate(java.lang.String date, java.lang.String locale)
Instantiate a ISODate object from the given date string.
-
Method Summary
-
Methods inherited from class com.adobe.xfa.ut.LcDate
add, format, getDateFormat, getDays, getISOWeek, getISOYear, getLocalDateFormat, getMonth, getMonthDay, getWeekDay, getWeekMonth, getYear, getYearDay, isValid, setGMDate, setLocalDate, toString
-
-
-
-
Constructor Detail
-
ISODate
public ISODate()
Instantiate an ISODate object from today's date.
-
ISODate
public ISODate(int days)
Instantiate an ISODate object from the given number of days from the epoch. The epoch is such that day 1 corresponds to Jan 1, 1900.- Parameters:
days
- the number of days from epoch.
-
ISODate
public ISODate(java.lang.String date, java.lang.String locale)
Instantiate a ISODate object from the given date string.- Parameters:
date
- an ISO8601/XFA date string.locale
- a locale string. When empty, it will default to the current locale.
-
ISODate
public ISODate(java.lang.String locale, int centurySplit)
Instantiate a ISODate object from today's date 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.
-
-