/** * Instantiate a new datelist with the same type, timezone and utc settings * as the origList. * @param origList * @return a new empty list. */ private static DateList getDateListInstance(final DateList origList) { final DateList list = new DateList(origList.getType()); if (origList.isUtc()) { list.setUtc(true); } else { list.setTimeZone(origList.getTimeZone()); } return list; }
/** * Instantiate a new datelist with the same type, timezone and utc settings * as the origList. * * @param origList * @return a new empty list. */ public static DateList getDateListInstance(final DateList origList) { final DateList list = new DateList(origList.getType()); if (origList.isUtc()) { list.setUtc(true); } else { list.setTimeZone(origList.getTimeZone()); } return list; }
/** * Instantiate a new datelist with the same type, timezone and utc settings * as the origList. * * @param origList * @return a new empty list. */ public static DateList getDateListInstance(final DateList origList) { final DateList list = new DateList(origList.getType()); if (origList.isUtc()) { list.setUtc(true); } else { list.setTimeZone(origList.getTimeZone()); } return list; }
/** * Instantiate a new datelist with the same type, timezone and utc settings * as the origList. * * @param origList * @return a new empty list. */ private static DateList getDateListInstance(final DateList origList) { final DateList list = new DateList(origList.getType()); if (origList.isUtc()) { list.setUtc(true); } else { list.setTimeZone(origList.getTimeZone()); } return list; }
/** * Instantiate a new datelist with the same type, timezone and utc settings * as the origList. * * @param origList * @return a new empty list. */ private static DateList getDateListInstance(final DateList origList) { final DateList list = new DateList(origList.getType()); if (origList.isUtc()) { list.setUtc(true); } else { list.setTimeZone(origList.getTimeZone()); } return list; }
/** * Add a date to the list. The date will be updated to reflect the * timezone of this list. * @param date the date to add * @return true * @see List#add(java.lang.Object) */ public final boolean add(final Date date) { if (date instanceof DateTime) { if (isUtc()) { ((DateTime) date).setUtc(true); } else { ((DateTime) date).setTimeZone(getTimeZone()); } } else if (!Value.DATE.equals(getType())) { final DateTime dateTime = new DateTime(date); dateTime.setTimeZone(getTimeZone()); return dates.add(dateTime); } return dates.add(date); }
if (dates.isUtc()) { ((DateTime) candidateSeed).setUtc(true); } else {
if (dates.isUtc()) { ((DateTime) candidateSeed).setUtc(true); } else {
if (dates.isUtc()) { ((DateTime) candidateSeed).setUtc(true); } else {
if (dates.isUtc()) { ((DateTime) candidateSeed).setUtc(true); } else {
/** * Add a date to the list. The date will be updated to reflect the * timezone of this list. * @param date the date to add * @return true * @see List#add(java.lang.Object) */ public final boolean add(final Date date) { if (date instanceof DateTime) { if (isUtc()) { ((DateTime) date).setUtc(true); } else { ((DateTime) date).setTimeZone(getTimeZone()); } } else if (!Value.DATE.equals(getType())) { final DateTime dateTime = new DateTime(date); dateTime.setTimeZone(getTimeZone()); return add((Object) dateTime); } return add((Object) date); }
if (dates.isUtc()) { ((DateTime) candidateSeed).setUtc(true);