Implement writeDate. 25/28 tests pass!