You'll need to convert `date` into an integer by calling `date.valueOf()` for this comparison to work