Fixes #871.

Added a comparator for DateTime objects.