feat: rename js files to ts
This commit is contained in:
parent
4cff3ebee1
commit
15b67136fe
114 changed files with 0 additions and 0 deletions
10
src/helpers/parseDateOrNull.ts
Normal file
10
src/helpers/parseDateOrNull.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
export const parseDateOrNull = date => {
|
||||
if (date instanceof Date) {
|
||||
return date
|
||||
}
|
||||
|
||||
if (date && !date.startsWith('0001')) {
|
||||
return new Date(date)
|
||||
}
|
||||
return null
|
||||
}
|
||||
Reference in a new issue