Skip to content

Consider adding isPast() and isFuture() methods for asserting dates #2932

@armandino

Description

@armandino

Feature summary

The new methods would be syntactic sugar for assertions similar to:

assertThat(LocalDate.now().minusDays(1)).isBefore(LocalDate.now());

Example

assertThat(LocalDate.now().minusDays(1)).isPast();
assertThat(Instant.now().plusSeconds(3)).isFuture();

Edit: tasks to track adding isInThePast() and isInTheFuture():

  • Instant
  • LocalDate
  • LocalDateTime
  • OffsetDateTime
  • ZonedDateTime

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions