fixes formatting of dates