Correctly consider year in beforeDate assertion