refactor date construction