13 lines
329 B
JavaScript
13 lines
329 B
JavaScript
|
export default function toDateHour(date) {
|
||
|
const dateHour = new Date(date).toLocaleDateString('es-ES', {
|
||
|
timeZone: 'Europe/Madrid',
|
||
|
year: 'numeric',
|
||
|
month: '2-digit',
|
||
|
day: '2-digit',
|
||
|
hour: '2-digit',
|
||
|
minute: '2-digit',
|
||
|
second: '2-digit',
|
||
|
});
|
||
|
return dateHour;
|
||
|
}
|