Add more logic for correct date display