fix: hotFix if not date return null/undefined
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
14b8fc150b
commit
3f167ffd3a
|
@ -1,5 +1,6 @@
|
|||
export default function toDateHourMin(date) {
|
||||
const dateHour = new Date(date).toLocaleDateString('es-ES', {
|
||||
if (!date) return date;
|
||||
return new Date(date).toLocaleDateString('es-ES', {
|
||||
timeZone: 'Europe/Madrid',
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
|
@ -7,5 +8,4 @@ export default function toDateHourMin(date) {
|
|||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
});
|
||||
return dateHour;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
export default function toDateHourMinSec(date) {
|
||||
const dateHour = new Date(date).toLocaleDateString('es-ES', {
|
||||
if (!date) return date;
|
||||
return new Date(date).toLocaleDateString('es-ES', {
|
||||
timeZone: 'Europe/Madrid',
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
|
@ -8,5 +9,4 @@ export default function toDateHourMinSec(date) {
|
|||
minute: '2-digit',
|
||||
second: '2-digit',
|
||||
});
|
||||
return dateHour;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue