Almost fixed formattedDate