eXparity / hamcrest-date

A Java library which provides a suite hamcrest matchers for matching dates, times, and moments in time
BSD 3-Clause "New" or "Revised" License
70 stars 11 forks source link

Why no support for OffsetDateTime? #24

Closed dalewking closed 4 years ago

stewbis commented 5 years ago

Hi dalewking.

Apologies for not getting back sooner and there's no reason for no support of OffsetDateTime, it was just an oversight. I'll add support for OffsetDateTime under this issue.

Regards

Stewart

Brutus5000 commented 5 years ago

ZonedDateTime would also be nice. I literally discovered your library 5 minutes ago and saw this issue. I see you are working on it. In case you don't have time to add ZonedDateTime I would like take on your OffsetDateTime work and continue it. Just ping me. Thanks for your effort 👍

stewbis commented 5 years ago

Hi @Brutus5000 - many thanks for the offer but ZonedDateTime is already supported under ZonedDateTimeMatchers, I'm actually doing a bit of a code cleanup before adding OffsetDateTime so probably not the best time to jump in - but thanks again

stewbis commented 4 years ago

OffsetDateTime support added with OffsetDateMatchers e.g.

assertThat(OffsetDateTime.now(), OffsetDateMatchers.after(OffsetDateTime.now().minusDays(1)))