mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-25 06:37:55 +00:00
5 lines
186 B
TypeScript
5 lines
186 B
TypeScript
export function differenceInSeconds(date1: Date, date2: Date): number {
|
|
const diffInMilliseconds = date1.getTime() - date2.getTime();
|
|
return Math.floor(diffInMilliseconds / 1000);
|
|
}
|