Extremal solutions, comparison principle and stability criteria for impulsive differential equations with variable times