months ago utility function