Added functions to detect activation period in addtion to the first activation day.