date.shouldHaveSameYearAs(otherDate) |
Checks that the date has the same year as the given date. |
date.shouldHaveSameMonthAs(otherDate) |
Checks that the date has the same month as the given date. |
date.shouldHaveSameDayAs(otherDate) |
Checks that the date has the same day of month as the given date. |
date.shouldBeBefore(otherDate) |
Checks that the date is before the given date. |
date.shouldBeAfter(otherDate) |
Checks that the date is after the given date. |
date.shouldBeWithin(period, otherDate) |
Checks that the date is within the period of the given date. |
date.shouldBeWithin(duration, otherDate) |
Checks that the date is within the duration of the given date. |
date.shouldBeBetween(firstDate, secondDate) |
Checks that the date is between firstDate and secondDate. |
date.shouldHaveYear(year) |
Checks that the date has the correct year. |
date.shouldHaveMonth(month) |
Checks that the date has the correct month. |
date.shouldHaveDayOfYear(day) |
Checks that the date has the exact day of year. |
date.shouldHaveDayOfMonth(day) |
Checks that the date has the correct day of month. |
date.shouldHaveDayOfWeek(day) |
Checks that the date has the correct day of week. |
date.shouldHaveHour(hour) |
Checks that the date has the correct hour. |
date.shouldHaveMinute(Minute) |
Checks that the date has the correct minute. |
date.shouldHaveSecond(second) |
Checks that the date has the correct second. |
date.shouldHaveNano(nano) |
Checks that the date has the correct nanosecond. |