Hamcrest Date adds Java 8 Support

Hamcrest Date adds Java 8 Support

On October 31, 2015, Posted by , In Uncategorized, With No Comments

An major update to the hamcrest-date library has been released that adds support for matching Java 8 date types using hamcrest. For example:

LocalDate today = LocalDate.now(); myBirthday = LocalDate.of(2015, AUGUST, 9);
assertThat(today, within(1, DAY, myBirthday));

The library is available from maven by adding the below to your pom;


Source code and complete documentation is at github

Leave a Reply