Quantum Dynamics of a Polar Rotor Acted upon by an Electric Rectangular Pulse of Variable Duration