extract unicode-to-date logic.