/** * Gets the date formatter * @return a copy of the date formatter associated with * this date interval formatter. * @stable ICU 4.0 */ public synchronized DateFormat getDateFormat() { return (DateFormat)fDateFormat.clone(); }
@Override public Object clone() { SimpleDateFormatICU other = (SimpleDateFormatICU)super.clone(); other.fIcuSdf = (SimpleDateFormat)this.fIcuSdf.clone(); return other; }
/** * Clone this Format object polymorphically. * @return A copy of the object. * @stable ICU 4.0 */ public synchronized Object clone() { DateIntervalFormat other = (DateIntervalFormat) super.clone(); other.fDateFormat = (SimpleDateFormat) fDateFormat.clone(); other.fInfo = (DateIntervalInfo) fInfo.clone(); other.fFromCalendar = (Calendar) fFromCalendar.clone(); other.fToCalendar = (Calendar) fToCalendar.clone(); other.fDatePattern = fDatePattern; other.fTimePattern = fTimePattern; other.fDateTimeFormat = fDateTimeFormat; return other; }