Closed MenoData closed 8 years ago
DateInterval
got following new methods:
public static DateInterval.between(LocalDate, LocalDate);
public static DateInterval.since(LocalDate);
public static DateInterval.until(LocalDate);
public static DateInterval.atomic(LocalDate);
public PlainDate getStartAsCalendarDate();
public LocalDate getStartAsLocalDate();
public PlainDate getEndAsCalendarDate();
public LocalDate getEndAsLocalDate();
ClockInterval
got following new methods:
public static ClockInterval.between(LocalTime, LocalTime);
public static ClockInterval.since(LocalTime);
public static ClockInterval.until(LocalTime);
public PlainTime getStartAsClockTime();
public LocalTime getStartAsLocalTime();
public PlainTime getEndAsClockTime();
public LocalTime getEndAsLocalTime();
TimestampInterval
got following new methods:
public static TimestampInterval.between(LocalDateTime, LocalDateTime);
public static TimestampInterval.since(LocalDateTime);
public static TimestampInterval.until(LocalDateTime);
public PlainTimestamp getStartAsTimestamp();
public LocalDateTime getStartAsLocalDateTime();
public PlainTimestamp getEndAsTimestamp();
public LocalDateTime getEndAsLocalDateTime();
MomentInterval
got following new methods:
public static MomentInterval.between(Instant, Instant);
public static MomentInterval.since(Instant);
public static MomentInterval.until(Instant);
public Moment getStartAsMoment();
public Instant getStartAsInstant();
public Moment getEndAsMoment();
public Instant getEndAsInstant();
Some people would like to have the option to create intervals of various boundary styles (closed, half-open, open, infinite) using JSR-310-types, see also
https://github.com/ThreeTen/threeten-extra/issues/53
Code examples: