Move relative date code to a separate module.