Doing some refactoring of the formatDatetimePretty method for - RA-173