otp cooldown

This commit is contained in:
yousef-alkhrissat
2024-08-09 18:44:28 +03:00
parent 3a5c518d11
commit 842e64a4d1
2 changed files with 38 additions and 1 deletions

View 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
}