currTick.setTime(timestamp);
}
@Override
public String getRangeLabel(Interval interval) {
FastChronoDate i = new FastChronoDate(interval.getStart());
FastChronoDate e = new FastChronoDate(interval.getEnd());
DateFormatter common = null;
DateFormatter prev = null;
boolean useformat = true;
if (timeUnitTickInterval.ms() < TimeUnit.DAY.ms()) {
if (i.getYear() != e.getYear() || i.getMonth() != e.getMonth()) {
common = DateFormatHelper.yearFormatter;
prev = DateFormatHelper.monthDayFormatter;
} else if (!dateFormat.day(i).equals(dateFormat.day(e))) {
common = DateFormatHelper.yearMonthFormatter;
prev = DateFormatHelper.dayFormatter;
} else {
common = DateFormatHelper.yearMonthDayFormatter;
}
} else if (timeUnitTickInterval == TimeUnit.DAY) {
prev = DateFormatHelper.yearMonthDayFormatter;
useformat = false;
}
String ret = "";
if (common != null) {
ret += common.format(i.getOffsetTime()) + ", ";
}
if (prev != null) {
if (false == useformat) {
ret += prev.format(i.getOffsetTime()) + " - " + prev.format(e.getOffsetTime());
} else {
ret += prev.format(i.getOffsetTime()) + "/" + format(i) + " - " + prev.format(e.getOffsetTime()) + "/" + format(e);
}
} else {
ret += getRangeLabelCompact(interval);
}