Package de.scravy.bedrock
Class DateTimes.Interval
java.lang.Object
de.scravy.bedrock.DateTimes.Interval
- Enclosing class:
- DateTimes
public static class DateTimes.Interval extends Object
-
Constructor Summary
Constructors Constructor Description Interval() -
Method Summary
Modifier and Type Method Description DateTimes.IntervaladjustBegin(Function<Instant,Instant> function)DateTimes.IntervaladjustEnd(Function<Instant,Instant> function)Seq<LocalDate>decomposeIntoDays()DateTimes.IntervalexpandTo(TemporalUnit timeUnit)Expand this interval to completely cover the specified units it spans into.DurationgetDuration()static DateTimes.Intervalof(Instant beginInclusive, Instant endExclusive)static DateTimes.Intervalparse(String string)static DateTimes.Intervalparse(String begin, String end)StringtoString()
-
Constructor Details
-
Interval
public Interval()
-
-
Method Details
-
parse
-
parse
-
of
-
adjustBegin
-
adjustEnd
-
expandTo
Expand this interval to completely cover the specified units it spans into.Example: If you have an Interval covering Apr 12th 4pm till Apr 15th 6am then it touches Apr 12th, 13t, 14th, and 15th. expandTo will extend the interval to properly reflect that and for the granularity days will make it span from Apr 12th 12am till Apr 16th am (end date exclusive as always).
- Returns:
- A new Interval
-
decomposeIntoDays
-
getDuration
-
toString
-