Removed a bug with dates bigger than 1 days