boussole-pluss/frontend/utils/formatDateTime.ts

5 lines
156 B
TypeScript

export default (date: string) => {
const dateObject = new Date(date);
return dateObject.toLocaleDateString() + ' ' + dateObject.toLocaleTimeString();
}