correct length of date string