Fix get time on non date var (#14361)

This commit is contained in:
Paul Rastoin
2025-09-09 09:59:55 +02:00
committed by GitHub
parent f7cde28dd6
commit 7bcbaee0c8
3 changed files with 13 additions and 2 deletions
@@ -0,0 +1,3 @@
// Temporary quick workaround until we eject from nestjs-query that seems to convert date to string and vice-versa
export const transpileToDateIfNot = (dateToVerify: string | Date): Date =>
dateToVerify instanceof Date ? dateToVerify : new Date(dateToVerify);