The Dynamics of Planetary Rotations