MOS:DATEUNIFY, also break into functions