Add support for converting to/from date objects.