BUG: Small fix for datetime : integer comparisons