if (t instanceof DefaultTemporalExtent) {
final DefaultTemporalExtent dt = (DefaultTemporalExtent) t;
if (location != 1) startTime = dt.getStartTime(); // Maybe user has overridden those methods.
if (location != 0) endTime = dt.getEndTime();
} else {
final TemporalPrimitive p = t.getExtent();
if (location != 1) startTime = DefaultTemporalExtent.getTime(p, true);
if (location != 0) endTime = DefaultTemporalExtent.getTime(p, false);
}
if (startTime != null && (min == null || startTime.before(min))) min = startTime;
if ( endTime != null && (max == null || endTime.after (max))) max = endTime;