Measuring a drive shaft?

My local shop told me to jack it up under the axle and then put the front yoke in all the way in the trans. Then measure from center to center for the u-joints and subtract an inch for installation.