Fixed bug with date format