Fix most of the date bugs