c8209c6c10
Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/570 Co-authored-by: konrad <konrad@kola-entertainments.de> Co-committed-by: konrad <konrad@kola-entertainments.de>
10 lines
171 B
JavaScript
10 lines
171 B
JavaScript
export const parseDateOrNull = date => {
|
|
if (date instanceof Date) {
|
|
return date
|
|
}
|
|
|
|
if (date && !date.startsWith('0001')) {
|
|
return new Date(date)
|
|
}
|
|
return null
|
|
}
|