Updated the date() method to better handle dates