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

Utililty matchers #6

Closed Proximator closed 11 years ago

Proximator commented 11 years ago

Hi stewbis,

I am thinking about useful date matchers. Fiew years back, I was looking for some utility methods to check if the date is a working day, bank hodiday etc So maybe we can add some matchers like that isWorkingDay isBankHoliday isToday isWeekend ....etc

stewbis commented 11 years ago

Bank holidays needs an up-to-date holiday calendar which is not something you can code into a general library that is used globally - so adding isBankHoliday() is not realistically viable.

IsWorkingDay() is also problematic because for many people everyday is a working day e.g. shops, call centers, etc.

isWeekDay() isWeekend(), isToday() will be added to the DayMatchers factory.