refactor redundant code into formatDateArguments