com.nls.util.DateTimeRangeSet Maven / Gradle / Ivy
package com.nls.util;
import org.joda.time.DateTime;
import org.joda.time.Seconds;
public class DateTimeRangeSet extends RangeSet {
public DateTimeRangeSet() {
}
public Seconds getSeconds() {
Seconds total = Seconds.seconds(0);
for (Range range : getRanges()) {
total = total.plus(Seconds.secondsBetween(range.getFrom(), range.getTo()));
}
return total;
}
protected RangeSet make() {
return new DateTimeRangeSet();
}
}