Weighted hazard ratio estimation for delayed and diminishing treatment effect