1

Quick question:

I´m having an Interval of one day:

Interval interval = new LocalDate().toInterval(DateTimeZone.getDefault());

Suppose I want to add one day at the beginning and one day at the end. Right now I use the methods withDurationBeforeEnd and withDurationAfterStart which don´t really fit to my use case. Am I missing something? I was looking for some API like Interval.addPeriod(Period period);

Or am I completely wrong and should use something else?

4

1 に答える 1

2
Interval newInterval = new Interval(oldInterval.getStart().minusDays(1), oldInterval.getEnd().plusDays(1)); 
于 2012-10-15T17:35:39.450 に答える