Sojourns and extremes of a diffusion process on a fixed interval