use arel for date comparison so works across sqlite and mysql