Fix and add tests to DateTypeExtension