Stay organized with collections Save and categorize content based on your preferences.

TimeRange.Companion

public static class TimeRange.Companion


Summary

Public methods

static final @NonNull TimeRange
after(@NonNull Instant startInstant)

Constructs a time range after a given point in time.

static final @NonNull TimeRange
before(@NonNull Instant endInstant)

Constructs a time range until a given point in time.

static final @NonNull TimeRange
between(@NonNull Instant startInstant, @NonNull Instant endInstant)

Constructs a time range between two points in time, inclusive of the points themselves.

Public methods

after

public static final @NonNull TimeRange after(@NonNull Instant startInstant)

Constructs a time range after a given point in time.

before

public static final @NonNull TimeRange before(@NonNull Instant endInstant)

Constructs a time range until a given point in time.

between

public static final @NonNull TimeRange between(@NonNull Instant startInstant, @NonNull Instant endInstant)

Constructs a time range between two points in time, inclusive of the points themselves.