mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-27 10:14:54 +00:00
otp cooldown
This commit is contained in:
4
libs/common/src/helper/differenceInSeconds.ts
Normal file
4
libs/common/src/helper/differenceInSeconds.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export function differenceInSeconds(date1: Date, date2: Date): number {
|
||||
const diffInMilliseconds = date1.getTime() - date2.getTime(); // Difference in milliseconds
|
||||
return Math.floor(diffInMilliseconds / 1000); // Convert to seconds and round down
|
||||
}
|
||||
Reference in New Issue
Block a user