WIP: fixing broken date comparisons