Refactor date and time format

To dry up some views and helpers