Interface Now
- All Known Implementing Classes:
Moments
,TimeMachine
public interface Now
An abstraction of the current point in time and today. Useful if application code needs to look them up, but you need
a mechanism to shift the time for testing local development purposes.
- Since:
- 1.1
- Author:
- Oliver Drotbohm
- See Also:
-
Method Summary
-
Method Details
-
now
LocalDateTime now()Returns the current point in time.- Returns:
- will never be null.
-
today
LocalDate today()Returns the current date.- Returns:
- will never be null.
-
instant
Instant instant()Returns the current Instant.- Returns:
- will never be null.
-