Make dates variable precision, add tests
Fix startdate max length