Ground- and excited-state diatomic bond lengths, vibrational levels, and potential-energy curves from conventional and localized Hartree-Fock-based density-functional theory.