Rotational spectroscopy of diatomic molecules