Better date formatting handling