Added formatTime and formatMonth functions