Fixed various date bugs.