CENTURY
is set, YEAR
, MONTH
, and DAY_OF_MONTH
must also be set. SECONDS
and ZONE_OFFSET
are always optional. Example:
PartialTimestamp date = new PartialTimestamp(); PartialTimestampFormat ptf = new PartialTimestampFormat(); date.set(PartialTimestamp.HOUR_OF_DAY, 11); date.set(PartialTimestamp.MINUTE, 30); String timeString = ptf.format(date); PartialTimestamp date2 = ptf.parse(timeString); assert(date.equals(date2));@author dan.templeton@sun.com @see PartialTimestamp @since 0.5 @version 1.0
|
|