public final class ISODate extends LcDate
Valid ISO8601/XFA date strings are in any one of the following date patterns:
LcDate
for the meaning of the various metasymbols used above.
Here's a snippet of code illustrating the use of
ISODate
to reformat an ISO8601/XFA date string
import 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);
DATE_FMT1, DATE_FMT2, DATE_PICTURE_SYMBOLS, DEFAULT_CENTURY_SPLIT, DEFAULT_DATE_FMT
Constructor and 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(String locale,
int centurySplit)
Instantiate a ISODate object from today's date given a locale string
and a possible century split year.
|
ISODate(String date,
String locale)
Instantiate a ISODate object from the given date string.
|
add, format, getDateFormat, getDays, getISOWeek, getISOYear, getLocalDateFormat, getMonth, getMonthDay, getWeekDay, getWeekMonth, getYear, getYearDay, isValid, setGMDate, setLocalDate, toString
public ISODate()
public ISODate(int days)
days
- the number of days from epoch.public ISODate(String date, String locale)
date
- an ISO8601/XFA date string.locale
- a locale string. When empty, it will default
to the current locale.public ISODate(String locale, int centurySplit)
locale
- a locale string. When empty, it will default
to the current locale.centurySplit
- a century split year.Copyright © 2010 - 2020 Adobe. All Rights Reserved