type DateType = string | number | Date ; const parse = ( date ) => new Date ( date ) ; const formatDateTime = ( date ) => parse ( date ) . toLocaleString ( ) ; export const date = { formatDateTime } ;