Fix a bug in date display.