Move implementation of valid date check to addCommand