Make dates work sensibly and test them